[Lldb-commits] [PATCH] D57466: [lldb] Relax libc++ ABI version checking

2019-01-30 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

aprantl might be a good reviewer for this.

The motivation here is that we set `_LIBCPP_ABI_VERSION` for chromium, which 
then confuses lldb.


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57466/new/

https://reviews.llvm.org/D57466



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D57466: [lldb] Relax libc++ ABI version checking

2019-01-31 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

labath, was that an lg? :-)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57466/new/

https://reviews.llvm.org/D57466



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D55376: Generate LLDB website/documentation from rst with Sphinx

2019-04-21 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.
Herald added a subscriber: ormris.

This (I'm guessing) broke https://lldb.llvm.org/lldb-gdb.html which is still 
present in many search indices. Could we make that page redirect to whatever is 
the new replacement? (https://www.w3.org/Provider/Style/URI etc)


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55376/new/

https://reviews.llvm.org/D55376



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D60963: Fix dereferencing null pointer

2019-04-22 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

test?


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60963/new/

https://reviews.llvm.org/D60963



___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D155178: [Support] Move StringExtras.h include from Error.h to Error.cpp (part 6)

2023-07-13 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

http://45.33.8.238/linux/112305/step_4.txt looks like a missing include


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D155178/new/

https://reviews.llvm.org/D155178

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D77287: Windows: support `DoLoadImage`

2021-12-04 Thread Nico Weber via Phabricator via lldb-commits
thakis added inline comments.



Comment at: lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp:397
+
+error.SetErrorStringWithFormat("LoadLibrary Error: %lu", error_code);
+return LLDB_INVALID_IMAGE_TOKEN;

```
../../lldb/source/Plugins/Platform/Windows/PlatformWindows.cpp:397:62: warning: 
format specifies type 'unsigned long' but the argument has type 'uint64_t' (aka 
'unsigned long long') [-Wformat]
error.SetErrorStringWithFormat("LoadLibrary Error: %lu", error_code);
   ~~~   ^~
   %llu
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77287/new/

https://reviews.llvm.org/D77287

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D115211: [lldb] Make the LLDB version a first class citizen

2021-12-08 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Thanks for this change! I always wondered why this strange lldbBase target 
existed in lldb/source instead of what's now done in this patch.




Comment at: lldb/source/CMakeLists.txt:4
-set(lldbBase_SOURCES
-lldb.cpp
-  )

should lldb.cpp be deleted too?



Comment at: lldb/source/Version/Version.cpp:18
+#else
+  return "lldb version " CLANG_VERSION_STRING;
+#endif

does this intentionally use CLANG_VERSION_STRING instead of LLDB_VERSION_STRING?

(if not: remove clang/Basic/Version.h include too)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115211/new/

https://reviews.llvm.org/D115211

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D115211: [lldb] Make the LLDB version a first class citizen

2021-12-10 Thread Nico Weber via Phabricator via lldb-commits
thakis added inline comments.



Comment at: lldb/source/CMakeLists.txt:4
-set(lldbBase_SOURCES
-lldb.cpp
-  )

thakis wrote:
> should lldb.cpp be deleted too?
fixed in D115438



Comment at: lldb/source/Version/Version.cpp:18
+#else
+  return "lldb version " CLANG_VERSION_STRING;
+#endif

thakis wrote:
> does this intentionally use CLANG_VERSION_STRING instead of 
> LLDB_VERSION_STRING?
> 
> (if not: remove clang/Basic/Version.h include too)
This is still wrong, I think.

(The include is needed for the clang::getclangRevision() call in 
lldb_private::GetVersion() though.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115211/new/

https://reviews.llvm.org/D115211

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D110216: [clang] retain type sugar in auto / template argument deduction

2022-01-04 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

> So, some notes:
>
> - We should probably also do an AKA on the type diff.
> - Chromium should use a clearer name for that typedef perhaps? Though calling 
> the first template parameter of span as `T` is common, maybe a better name 
> here would be `element_type`.
>
> Having a convenient way to just name a type like that also seems useful, so 
> maybe the rename coupled with the AKA would be an improvement overall?

Haha :) Thanks for taking a look. aka for typedefs sounds like a nice approach 
to me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110216/new/

https://reviews.llvm.org/D110216

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D115960: Revert D109159 "[amdgpu] Enable selection of `s_cselect_b64`."

2022-01-05 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Not sure what happened here but this change added back a whole bunch of old 
code. I reverted this in 085f078307bac264301b07f6e47e2a04e90a6f1d 
 . Please 
carefully check `git diff origin/main` before committing next time :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115960/new/

https://reviews.llvm.org/D115960

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D117564: [lldb] Remove the requirement for windows clients to specify -DIMPORT_LIBLLDB

2022-01-19 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Before this change, it was very easy to build liblldb as a static library (just 
don't define IMPORT_LIBLLDB and EXPORT_LIBLLDB). After this change, this is no 
longer possible on Windows (but it still works fine everywhere else). Is this 
intentional?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117564/new/

https://reviews.llvm.org/D117564

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D117564: [lldb] Remove the requirement for windows clients to specify -DIMPORT_LIBLLDB

2022-01-19 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

> So what happens now if you define LLDB_IN_LIBLLDB? Does dllexport explode if 
> used in a static library?

Do you mean define it for all targets, instead of for just liblldb?

If just for liblldb, then the link fails because (e.g.) driver tries to 
dllimport the symbols in liblldb then.

If you mean "define for everything", I haven't checked (since it's inconvenient 
to do).

To be clear, this isn't a huge problem for me, I'll just switch to a dll on 
Windows. The old system just seemed more flexible than the new setup, without 
being more complicated. (Maybe you're planning to do some followup that 
requires this change.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117564/new/

https://reviews.llvm.org/D117564

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D117564: [lldb] Remove the requirement for windows clients to specify -DIMPORT_LIBLLDB

2022-01-19 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

> The background here is that I found this patch in one of my old WIP branches. 
> The next patch in the series was going to define LLDB_API to 
> `__attribute__((visibility("default")))` on the non-windows path (and make 
> everything else hidden), but I have no idea why I wanted to do that. I mean, 
> it does not sounds like an *un*reasonable thing to do, but am not going to do 
> unless I find some benefit to it (maybe it saves size?)

It'd allow getting rid of the .exports files, which would be nice I suppose.

> Anyway, what would you say if we wrapped this entire LLDB_API-setting block 
> in an `#ifndef LLDB_API`? That way, things would still work out-of-the-box in 
> the default (supported) configuration, but users who know what they're doing 
> can define it to visibility(default), nothing, or whatever else, and that 
> would take precedence.

That sounds like a good idea to me.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117564/new/

https://reviews.llvm.org/D117564

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D117490: [lldb] Make logging machinery type-safe

2022-01-25 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Looks like this doesn't build on Mac: http://45.33.8.238/macm1/26315/step_4.txt


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117490/new/

https://reviews.llvm.org/D117490

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D117490: [lldb] Make logging machinery type-safe

2022-01-25 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

And e


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117490/new/

https://reviews.llvm.org/D117490

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D117490: [lldb] Make logging machinery type-safe

2022-01-25 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

And even less on windows: http://45.33.8.238/win/53319/step_4.txt


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117490/new/

https://reviews.llvm.org/D117490

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D120195: Cleanup llvm/DebugInfo/PDB headers

2022-02-23 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Breaks building on win: http://45.33.8.238/win/53749/step_4.txt

Please take a look and revert for now if it takes a while to fix.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120195/new/

https://reviews.llvm.org/D120195

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D120321: [lldb] Modernize ThreadLauncher

2022-02-23 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Looks like this breaks building on Windows: 
http://45.33.8.238/win/53761/step_4.txt

Please take a look.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120321/new/

https://reviews.llvm.org/D120321

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D120321: [lldb] Modernize ThreadLauncher

2022-02-23 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120321/new/

https://reviews.llvm.org/D120321

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D120425: [lldb/host] Remove monitor_signals argument from process monitoring functions

2022-02-24 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Breaks Mac build: http://45.33.8.238/macm1/28811/step_4.txt

Ptal.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120425/new/

https://reviews.llvm.org/D120425

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D120972: [lldb] Show progress events in the command line driver

2022-03-08 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

This breaks building on Windows where GetMessage is defined to GetMessageW: 
http://45.33.8.238/win/54664/step_4.txt

Please fix (just rename to something else), or revert for now if it takes a 
while to fix.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120972/new/

https://reviews.llvm.org/D120972

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D120810: [lldb] Remove the global platform list

2022-03-09 Thread Nico Weber via Phabricator via lldb-commits
thakis added inline comments.



Comment at: lldb/source/Plugins/Platform/gdb-server/CMakeLists.txt:10
 lldbPluginProcessUtility
+lldbPluginProcessGDBRemote
   )

It doesn't seem like lldb cares about this kind of thing, but this adds a 
dependency cycle: 
lldbPluginPlatformGDB->lldbPluginProcessGDBRemote->lldbPluginPlatformMacOSX->lldbPluginPlatformPOSIX->lldbPluginPlatformGDB


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120810/new/

https://reviews.llvm.org/D120810

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D126464: [lldb] Add support to load object files from thin archives

2022-07-04 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

What `--author` flag should I use for you when landing this?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126464/new/

https://reviews.llvm.org/D126464

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D126464: [lldb] Add support to load object files from thin archives

2022-07-05 Thread Nico Weber via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdc46ae6df5f7: [lldb] Add support to load object files from 
thin archives (authored by PRESIDENT810, committed by thakis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126464/new/

https://reviews.llvm.org/D126464

Files:
  lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
  lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
  lldb/test/API/functionalities/archives/Makefile
  lldb/test/API/functionalities/archives/TestBSDArchives.py
  lldb/test/API/functionalities/archives/c.c
  lldb/test/API/lit.cfg.py
  lldb/test/CMakeLists.txt

Index: lldb/test/CMakeLists.txt
===
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -148,6 +148,7 @@
   llvm-objcopy
   llvm-pdbutil
   llvm-readobj
+  llvm-ar
   )
 
 if(TARGET lld)
Index: lldb/test/API/lit.cfg.py
===
--- lldb/test/API/lit.cfg.py
+++ lldb/test/API/lit.cfg.py
@@ -162,6 +162,10 @@
 if is_configured('llvm_libs_dir'):
   dotest_cmd += ['--env', 'LLVM_LIBS_DIR=' + config.llvm_libs_dir]
 
+# This path may be needed to locate required llvm tools
+if is_configured('llvm_tools_dir'):
+  dotest_cmd += ['--env', 'LLVM_TOOLS_DIR=' + config.llvm_tools_dir]
+
 # Forward ASan-specific environment variables to tests, as a test may load an
 # ASan-ified dylib.
 for env_var in ('ASAN_OPTIONS', 'DYLD_INSERT_LIBRARIES'):
Index: lldb/test/API/functionalities/archives/c.c
===
--- /dev/null
+++ lldb/test/API/functionalities/archives/c.c
@@ -0,0 +1,11 @@
+static int __c_global = 3;
+
+int c(int arg) {
+  int result = arg + __c_global;
+  return result;
+}
+
+int cc(int arg1) {
+  int result3 = arg1 - __c_global;
+  return result3;
+}
Index: lldb/test/API/functionalities/archives/TestBSDArchives.py
===
--- lldb/test/API/functionalities/archives/TestBSDArchives.py
+++ lldb/test/API/functionalities/archives/TestBSDArchives.py
@@ -58,3 +58,10 @@
 self.expect("frame variable", VARIABLES_DISPLAYED_CORRECTLY,
 substrs=['(int) arg = 2'])
 self.expect_var_path("__b_global", type="int", value="2")
+
+# Test loading thin archives
+archive_path = self.getBuildArtifact("libbar.a")
+module_specs = lldb.SBModuleSpecList.GetModuleSpecifications(archive_path)
+num_specs = module_specs.GetSize()
+self.assertEqual(num_specs, 1)
+self.assertEqual(module_specs.GetSpecAtIndex(0).GetObjectName(), "c.o")
Index: lldb/test/API/functionalities/archives/Makefile
===
--- lldb/test/API/functionalities/archives/Makefile
+++ lldb/test/API/functionalities/archives/Makefile
@@ -1,8 +1,8 @@
-C_SOURCES := main.c a.c b.c
+C_SOURCES := main.c a.c b.c c.c
 EXE :=  # Define a.out explicitly
 MAKE_DSYM := NO
 
-all: a.out
+all: a.out libbar.a
 
 a.out: main.o libfoo.a
 	$(LD) $(LDFLAGS) $^ -o $@
@@ -11,4 +11,11 @@
 	$(AR) $(ARFLAGS) $@ $^
 	$(RM) $^
 
+# This tests whether lldb can load a thin archive
+libbar.a: c.o
+	$(eval LLVM_AR := $(LLVM_TOOLS_DIR)/llvm-ar)
+	$(eval LLVM_ARFLAGS := -rcsDT)
+	$(LLVM_AR) $(LLVM_ARFLAGS) $@ $^
+	# Note for thin archive case, we cannot remove c.o
+
 include Makefile.rules
Index: lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
===
--- lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
+++ lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
@@ -15,19 +15,24 @@
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/FileSpec.h"
 
+#include "llvm/Object/Archive.h"
 #include "llvm/Support/Chrono.h"
+#include "llvm/Support/Path.h"
 
 #include 
 #include 
 #include 
 
+enum class ArchiveType { Invalid, Archive, ThinArchive };
+
 class ObjectContainerBSDArchive : public lldb_private::ObjectContainer {
 public:
   ObjectContainerBSDArchive(const lldb::ModuleSP &module_sp,
 lldb::DataBufferSP &data_sp,
 lldb::offset_t data_offset,
 const lldb_private::FileSpec *file,
-lldb::offset_t offset, lldb::offset_t length);
+lldb::offset_t offset, lldb::offset_t length,
+ArchiveType archive_type);
 
   ~ObjectContainerBSDArchive() override;
 
@@ -54,7 +59,7 @@
 lldb::offset_t length,
 lldb_private::ModuleSpecList &specs);
 
-  static bool MagicBytesMatch(const lldb_private::DataExtractor &data);
+  static ArchiveType Magic

[Lldb-commits] [PATCH] D126464: [lldb] Add support to load object files from thin archives

2022-07-05 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Done.

Thanks for the fix! :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126464/new/

https://reviews.llvm.org/D126464

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D130309: [NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute.

2022-07-22 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

This doesn't build, as far as I can tell: 
http://45.33.8.238/linux/82002/step_4.txt

Please take a look, and revert for now if it takes a while to fix.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130309/new/

https://reviews.llvm.org/D130309

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D130309: [NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute.

2022-07-22 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Still broken on windows for me: http://45.33.8.238/win/62911/step_4.txt


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130309/new/

https://reviews.llvm.org/D130309

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D130309: [NFC] Improve FileSpec internal APIs and usage in preparation for adding caching of resolved/absolute.

2022-07-23 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Reverted in 1b4b12a34022b13b35755d9c941f7f13753e5e96 
 for now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130309/new/

https://reviews.llvm.org/D130309

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D130689: [LLVM] Update C++ standard to 17

2022-07-28 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

It'd be nice if this was landed opt-in behind some cmake variable at first, so 
that folks could try it out on their bots and see how well things work.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130689/new/

https://reviews.llvm.org/D130689

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D130689: [LLVM] Update C++ standard to 17

2022-07-30 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

In D130689#3686716 , @thieta wrote:

> You can already test this with `-DCMAKE_CXX_STANDARD=17` afaik. I wonder how 
> many bot owners would actually test this if we made another flag available.

Thanks, that works.

Our linux and win bots are happy, but our mac bot fails with:

  
/opt/s/w/ir/cache/builder/src/third_party/llvm/llvm/include/llvm/Support/RWMutex.h:98:8:
 error: 'shared_mutex' is unavailable: introduced in macOS 10.12
std::shared_mutex impl;
 ^
  
/opt/s/w/ir/cache/osx_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/include/c++/v1/shared_mutex:179:58:
 note: 'shared_mutex' has been explicitly marked unavailable here
  class _LIBCPP_TYPE_VIS _LIBCPP_AVAILABILITY_SHARED_MUTEX shared_mutex
   ^

Is it expected and intentional that this increases the mac deployment target to 
10.12?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130689/new/

https://reviews.llvm.org/D130689

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D130689: [LLVM] Update C++ standard to 17

2022-08-04 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

In D130689#3696186 , @thieta wrote:

> @nikic @thakis I fixed this issue in https://reviews.llvm.org/D131063 and it 
> can be built with CXX_STANDARD=17 and OSX_DEPLOYMENT_TARGET=10.11.

Thanks! We took this opportunity to bump our clang deployment target from 10.7 
to 10.12 (which makes a few other minor things easier too), so we don't need 
this change any more. But it's a good change anyways :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130689/new/

https://reviews.llvm.org/D130689

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D130689: [LLVM] Update C++ standard to 17

2022-08-08 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Re MSVC: For what it's worth, our Chromium windows bot (which builds trunk llvm 
and then chromium with that) is happy. It builds with MSVC 2019. Here's the 
build log (which includes cmake invocations): 
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket/8806536120229097233/+/u/gclient_runhooks/stdout?format=raw

(Look for `DCMAKE_BUILD_TYPE=Release'`.)

The bot builds clang;lld;clang-tools-extra. It also builds compiler-rt, but 
using the runtimes build, so I think compiler-rt is built with the just-built 
clang.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130689/new/

https://reviews.llvm.org/D130689

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D130689: [LLVM] Update C++ standard to 17

2022-08-10 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Re rollout: I suggested further up to put this behind an opt-in variable. That 
would've allowed people to test this on their setups. I still think that's a 
good suggestion, and it would've identified the MSVC issue at least.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130689/new/

https://reviews.llvm.org/D130689

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D130342: [LLDB][RISCV] Add riscv register definition and read/write

2022-08-11 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

This breaks building on windows: http://45.33.8.238/win/64255/step_4.txt

Please take a look and revert for now if it takes a while to fix.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130342/new/

https://reviews.llvm.org/D130342

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D131667: [LLDB][RISCV] Fix risc-v target build

2022-08-11 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.
Herald added a subscriber: JDevlieghere.

This helped, thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D131667/new/

https://reviews.llvm.org/D131667

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D132300: [clang][lldb][cmake] Use new `*_INSTALL_LIBDIR_BASENAME` CPP macro

2022-08-20 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

I fixed up the gn build after this in 804d4594cbe217ae817b6786b0e9965283f78aa2 



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132300/new/

https://reviews.llvm.org/D132300

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D132300: [clang][lldb][cmake] Use new `*_INSTALL_LIBDIR_BASENAME` CPP macro

2022-08-20 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

(ie if you revert that, it'd be appreciated if you could revert that in the 
same commit)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132300/new/

https://reviews.llvm.org/D132300

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D127702: Support logpoints in lldb-vscode

2022-06-20 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Looks like this might not build: http://45.33.8.238/linux/79194/step_4.txt

Please take a look and revert for now if it takes a while to fix.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127702/new/

https://reviews.llvm.org/D127702

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D127702: Support logpoints in lldb-vscode

2022-06-20 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Here too: https://lab.llvm.org/buildbot#builders/83/builds/20210


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127702/new/

https://reviews.llvm.org/D127702

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D130586: [cmake] Use `CMAKE_INSTALL_LIBDIR` too

2022-12-07 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

When this relands and it's not too much trouble, it'd be nice if you could 
reland d3a1dbc4907b59690f9013cdb6221573ca4233f1 
 in the 
commit that relands this.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130586/new/

https://reviews.llvm.org/D130586

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D137338: Fix dupe word typos

2022-12-07 Thread Nico Weber via Phabricator via lldb-commits
thakis added inline comments.
Herald added a reviewer: njames93.



Comment at: clang/lib/Driver/ToolChains/Darwin.cpp:47
   // complete architecture list, nor a reasonable subset. The problem is that
-  // historically the driver driver accepts this and also ties its -march=
   // handling to the architecture name, so we need to be careful before 
removing

aaron.ballman wrote:
> This is duplicated just often enough and in just enough contexts where I 
> think "driver driver" means "the driver that drives another driver", but it'd 
> be nice if someone else could confirm or deny that.
I think that's correct. IIRC, the "driver driver" was a feature in apple gcc 
long ago, and it was a driver that invoked the gcc driver once per `-arch` or 
some such. One of the early goals of clang was to just have a driver, but no 
driver driver.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137338/new/

https://reviews.llvm.org/D137338

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D137838: [RFC][Support] Move TargetParsers to new component

2022-12-07 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

This is a gigantic diff. I'd recommend keeping the .h files in the old place 
for v0 and make them just forwarding headers that include the header at the new 
location. That way, you don't have to update oodles of include lines in this 
patch, and it makes it a bit easier to see what's going on. (You can then 
update all the include lines in a trivial follow-up if this change goes 
through, and then remove the forwarding headers in Support, to cut the 
dependency you want to remove.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137838/new/

https://reviews.llvm.org/D137838

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D137838: [Support] Move TargetParsers to new component

2022-12-20 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Thanks for the heads-up. I updated the GN build in 
4ac51dd53d93b8dd18c58093766483c657fe3a08 
 and 
2aa998d22fe09191cd6c1b697e373266c1131502 
. The 
latter commit has a python script in the commit message that might be useful to 
others who want to port this to other build systems.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137838/new/

https://reviews.llvm.org/D137838

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D140800: Precompute OptTable prefixes union table through tablegen

2023-01-01 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Could we make this an optional opt-in maybe? I imagine for the majority of the 
tools, this has no measurable effect, but it currently makes the Opt library 
harder to use for every client.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140800/new/

https://reviews.llvm.org/D140800

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D140800: Precompute OptTable prefixes union table through tablegen

2023-01-01 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

I'd only use it in clang tbh. Clang uses many orders of magnitudes more opts 
than all other tools, and even there it's not a _huge_ win. (2% on empty file 
is very nice! But most of the time, people don't compile empty files, and I'm 
guessing on non-empty files this is a negligible win even in clang.) What do 
you think?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140800/new/

https://reviews.llvm.org/D140800

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D140800: [OptTable] Precompute OptTable prefixes union table through tablegen

2023-01-12 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Thanks for this change :)




Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:141
 
-class WrapperOptTable : public opt::OptTable {
+class WrapperOptTable : public opt::GenericOptTable {
 public:

C



Comment at: llvm/include/llvm/Option/OptTable.h:257
+/// Specialization of OptTable
+class GenericOptTable : public OptTable {
+  SmallVector PrefixesUnionBuffer;

(nit, kind of too late now: I would've renamed the base class to `BaseOptTable` 
or what and kept `OptTable` for this one, so that all the tools wouldn't have 
to be touched at all.)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140800/new/

https://reviews.llvm.org/D140800

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D140800: [OptTable] Precompute OptTable prefixes union table through tablegen

2023-01-12 Thread Nico Weber via Phabricator via lldb-commits
thakis added inline comments.



Comment at: clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp:141
 
-class WrapperOptTable : public opt::OptTable {
+class WrapperOptTable : public opt::GenericOptTable {
 public:

thakis wrote:
> C
…not sure what this was, please ignore :)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140800/new/

https://reviews.llvm.org/D140800

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D146668: [lldb-server] Use Platform plugin corresponding to the host

2023-03-25 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Hello, 
https://github.com/llvm/llvm-project/commit/5fb4147f74ad90095f08f243e5f19877d09d11b9
 broke the windows build (http://45.33.8.238/win/76494/step_4.txt) because it's 
now including system headers within namespace lldb. Please take a look and 
revert for now if it takes a while to fix.

(Saying that here since I see no phab link on the bad commit. Uploading changes 
to phab gives you access to pre-commit testing on a bunch of platforms, so it's 
useful even for post-commit reviewed patches)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146668/new/

https://reviews.llvm.org/D146668

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D146977: [lldb-server/linux] Use waitpid(-1) to collect inferior events

2023-03-30 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Looks like this breaks building on Mac: 
http://45.33.8.238/macm1/57676/step_4.txt

Please take a look and revert for now if it takes a while to fix.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D146977/new/

https://reviews.llvm.org/D146977

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-17 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Reverted this and follow-ups in d763c6e5e2d0a6b34097aa7dabca31e9aff9b0b6 
 for now.

Sorry this is such a pain to land :(

(See also discussion over in D150688 )


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-17 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

https://github.com/llvm/llvm-project/issues/62719 is independent of chromium 
and others have reported problems above too, from what I understand. Is that 
not accurate?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D144509: [CMake] Bumps minimum version to 3.20.0.

2023-05-17 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Is https://reviews.llvm.org/D144509#4347562 fixed?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144509/new/

https://reviews.llvm.org/D144509

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109367: [lldb] Alphabetize some CMake files a bit better

2021-09-07 Thread Nico Weber via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGea04bf302cf8: [lldb] Alphabetize some CMake files a bit 
better (authored by thakis).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109367/new/

https://reviews.llvm.org/D109367

Files:
  lldb/source/Plugins/ObjectFile/CMakeLists.txt
  lldb/source/Plugins/SymbolFile/CMakeLists.txt
  lldb/source/Plugins/SymbolVendor/CMakeLists.txt


Index: lldb/source/Plugins/SymbolVendor/CMakeLists.txt
===
--- lldb/source/Plugins/SymbolVendor/CMakeLists.txt
+++ lldb/source/Plugins/SymbolVendor/CMakeLists.txt
@@ -1,6 +1,7 @@
+add_subdirectory(ELF)
+
 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   add_subdirectory(MacOSX)
 endif()
 
-add_subdirectory(ELF)
 add_subdirectory(wasm)
Index: lldb/source/Plugins/SymbolFile/CMakeLists.txt
===
--- lldb/source/Plugins/SymbolFile/CMakeLists.txt
+++ lldb/source/Plugins/SymbolFile/CMakeLists.txt
@@ -1,5 +1,5 @@
 add_subdirectory(Breakpad)
 add_subdirectory(DWARF)
-add_subdirectory(Symtab)
 add_subdirectory(NativePDB)
 add_subdirectory(PDB)
+add_subdirectory(Symtab)
Index: lldb/source/Plugins/ObjectFile/CMakeLists.txt
===
--- lldb/source/Plugins/ObjectFile/CMakeLists.txt
+++ lldb/source/Plugins/ObjectFile/CMakeLists.txt
@@ -1,8 +1,8 @@
 add_subdirectory(Breakpad)
 add_subdirectory(ELF)
+add_subdirectory(JIT)
 add_subdirectory(Mach-O)
 add_subdirectory(Minidump)
 add_subdirectory(PDB)
 add_subdirectory(PECOFF)
-add_subdirectory(JIT)
 add_subdirectory(wasm)


Index: lldb/source/Plugins/SymbolVendor/CMakeLists.txt
===
--- lldb/source/Plugins/SymbolVendor/CMakeLists.txt
+++ lldb/source/Plugins/SymbolVendor/CMakeLists.txt
@@ -1,6 +1,7 @@
+add_subdirectory(ELF)
+
 if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
   add_subdirectory(MacOSX)
 endif()
 
-add_subdirectory(ELF)
 add_subdirectory(wasm)
Index: lldb/source/Plugins/SymbolFile/CMakeLists.txt
===
--- lldb/source/Plugins/SymbolFile/CMakeLists.txt
+++ lldb/source/Plugins/SymbolFile/CMakeLists.txt
@@ -1,5 +1,5 @@
 add_subdirectory(Breakpad)
 add_subdirectory(DWARF)
-add_subdirectory(Symtab)
 add_subdirectory(NativePDB)
 add_subdirectory(PDB)
+add_subdirectory(Symtab)
Index: lldb/source/Plugins/ObjectFile/CMakeLists.txt
===
--- lldb/source/Plugins/ObjectFile/CMakeLists.txt
+++ lldb/source/Plugins/ObjectFile/CMakeLists.txt
@@ -1,8 +1,8 @@
 add_subdirectory(Breakpad)
 add_subdirectory(ELF)
+add_subdirectory(JIT)
 add_subdirectory(Mach-O)
 add_subdirectory(Minidump)
 add_subdirectory(PDB)
 add_subdirectory(PECOFF)
-add_subdirectory(JIT)
 add_subdirectory(wasm)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109185: [gn build] Add build files for LLDB

2021-09-07 Thread Nico Weber via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcfe02847496b: [gn build] Add build files for LLDB (authored 
by thakis).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Changed prior to commit:
  https://reviews.llvm.org/D109185?vs=371131&id=371149#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109185/new/

https://reviews.llvm.org/D109185

Files:
  lldb/source/Symbol/CMakeLists.txt
  llvm/utils/gn/build/BUILD.gn
  llvm/utils/gn/build/toolchain/BUILD.gn
  llvm/utils/gn/secondary/BUILD.gn
  llvm/utils/gn/secondary/lldb/include/lldb/Host/BUILD.gn
  llvm/utils/gn/secondary/lldb/include/lldb/Host/libedit.gni
  llvm/utils/gn/secondary/lldb/source/API/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Breakpoint/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Commands/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Core/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/DataFormatters/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Expression/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Host/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Host/macosx/objcxx/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Initialization/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Interpreter/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/ABI/X86/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Architecture/PPC64/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Disassembler/LLVMC/BUILD.gn
  
llvm/utils/gn/secondary/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/DynamicLoader/MacOSX-DYLD/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/DynamicLoader/Static/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/ExpressionParser/Clang/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Instruction/ARM/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/JITLoader/GDB/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Language/CPlusPlus/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Language/ClangCommon/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Language/ObjC/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Language/ObjCPlusPlus/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/LanguageRuntime/CPlusPlus/BUILD.gn
  
llvm/utils/gn/secondary/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/BUILD.gn
  
llvm/utils/gn/secondary/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/LanguageRuntime/ObjC/BUILD.gn
  
llvm/utils/gn/secondary/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/BUILD.gn
  
llvm/utils/gn/secondary/lldb/source/Plugins/ObjectContainer/BSD-Archive/BUILD.gn
  
llvm/utils/gn/secondary/lldb/source/Plugins/ObjectContainer/Universal-Mach-O/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/ObjectFile/Breakpad/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/ObjectFile/ELF/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/ObjectFile/JIT/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/ObjectFile/Mach-O/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/ObjectFile/PDB/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/ObjectFile/PECOFF/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/ObjectFile/wasm/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Platform/MacOSX/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Platform/MacOSX/objcxx/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Platform/POSIX/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Platform/Windows/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Process/Utility/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Process/elf-core/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Process/gdb-remote/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Process/mach-core/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/Process/minidump/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/ScriptInterpreter/None/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/SymbolFile/Breakpad/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/SymbolFile/DWARF/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/SymbolFile/NativePDB/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/SymbolFile/PDB/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/SymbolFile/Symtab/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/SymbolVendor/ELF/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/SymbolVendor/MacOSX/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/SymbolVendor/wasm/BUILD.gn
  llvm/utils/gn/secondary/lldb/source/Plugins/

[Lldb-commits] [PATCH] D109463: gn build: Add support for building LLDB on Linux.

2021-09-08 Thread Nico Weber via Phabricator via lldb-commits
thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.

Very cool. LG with top-level BUILD.gn comment addressed :)




Comment at: llvm/utils/gn/secondary/BUILD.gn:15
 "//lld/test",
+"//lldb",
 "//llvm/test",

Does this build fine on windows?

Generally this only depends on the test targets which in turn depend on the 
binaries, so probably should only have the old/test dep in this file anyways.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109463/new/

https://reviews.llvm.org/D109463

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109464: gn build: Add support for building lldb-server on Android.

2021-09-08 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

LGTM


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109464/new/

https://reviews.llvm.org/D109464

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109463: gn build: Add support for building LLDB on Linux.

2021-09-08 Thread Nico Weber via Phabricator via lldb-commits
thakis added inline comments.



Comment at: llvm/utils/gn/secondary/BUILD.gn:15
 "//lld/test",
+"//lldb",
 "//llvm/test",

pcc wrote:
> thakis wrote:
> > Does this build fine on windows?
> > 
> > Generally this only depends on the test targets which in turn depend on the 
> > binaries, so probably should only have the old/test dep in this file 
> > anyways.
> You're right, this needs to avoid the dependency on lldb on Windows targets.
> 
> The problem with only depending on `//lldb/test` is that nothing else refers 
> to `//lldb`, so `ninja lldb` wouldn't also build `lldb-server`. Maybe it 
> would be better to add `lldb-server` to the `data_deps` of 
> `//lldb/tools/driver:lldb` instead then.
I guess `//lldb/test` could depend on `//:lldb` instead of 
`//lldb/tools/driver`?

We currently don't use data_deps anywhere else. (I have 
https://github.com/nico/llvm-project/commit/7246393c6bbc270044641415ffb0db93ffee3e29
 on a branch, but uploads with static links take so long that it isn't really 
worth it. Maybe I should revisit that with `-fno-semantic-interposition`…)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109463/new/

https://reviews.llvm.org/D109463

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109463: gn build: Add support for building LLDB on Linux.

2021-09-08 Thread Nico Weber via Phabricator via lldb-commits
thakis added inline comments.



Comment at: llvm/utils/gn/secondary/BUILD.gn:15
 "//lld/test",
+"//lldb",
 "//llvm/test",

pcc wrote:
> thakis wrote:
> > pcc wrote:
> > > thakis wrote:
> > > > Does this build fine on windows?
> > > > 
> > > > Generally this only depends on the test targets which in turn depend on 
> > > > the binaries, so probably should only have the old/test dep in this 
> > > > file anyways.
> > > You're right, this needs to avoid the dependency on lldb on Windows 
> > > targets.
> > > 
> > > The problem with only depending on `//lldb/test` is that nothing else 
> > > refers to `//lldb`, so `ninja lldb` wouldn't also build `lldb-server`. 
> > > Maybe it would be better to add `lldb-server` to the `data_deps` of 
> > > `//lldb/tools/driver:lldb` instead then.
> > I guess `//lldb/test` could depend on `//:lldb` instead of 
> > `//lldb/tools/driver`?
> > 
> > We currently don't use data_deps anywhere else. (I have 
> > https://github.com/nico/llvm-project/commit/7246393c6bbc270044641415ffb0db93ffee3e29
> >  on a branch, but uploads with static links take so long that it isn't 
> > really worth it. Maybe I should revisit that with 
> > `-fno-semantic-interposition`…)
> And then `//:lldb` would depend on lldb and the various lldb-servers? I 
> suppose that could work.
> 
> It seems like clang's existing dependency on e.g. clang-offload-bundler, 
> which is the sort of dependency we want here, is currently added via deps, 
> and I see that your change moves that to data_deps. For 
> executable->executable dependencies I suppose that deps means the same thing 
> as data_deps (test isolation aside) but to be consistent with what's in clang 
> maybe we should just stick to what I have here except with s/data_deps/deps/g.
sgtm.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109463/new/

https://reviews.llvm.org/D109463

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109463: gn build: Add support for building LLDB on Linux.

2021-09-08 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

(Please watch http://45.33.8.238/ when landing this :) )


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109463/new/

https://reviews.llvm.org/D109463

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109185: [gn build] Add build files for LLDB

2021-09-09 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

In D109185#2988837 , @teemperor wrote:

> Thanks! Out of curiosity, is there a public GN bot that is testing this?

The GN bots at http://45.33.8.238/ do the compile step. They don't yet run lldb 
tests. Maybe I'll add that, but maybe I'll wait until more of the test suite is 
brought up.

>> LLDB has many dependency cycles, something GN doesn't allow. For that 
>> reason, I've omitted some dependency edges. Hopefully we can clean up the 
>> cycles one day.
>
> No idea about GN, but I would assume this would break the build in some form? 
> Or does this just mean ninja doesn't know the dependencies and the build 
> process has a race condition?

The CMake build works around this with the `set_target_properties(lldbCore 
PROPERTIES LINK_INTERFACE_MULTIPLICITY 5)` hack in 
lldb/source/Core/CMakeLists.txt.

In the GN build, it means you can't really build the libraries independently. 
But the binaries build fine (…at least with lld and ld64. It's possible BFD ld 
needs a --start-group / --end-group around libraries? Haven't tried that yet.)

>> LLDB has a public/private header distinction, but mostly ignores it.
>> Many libraries include private headers from other modules.
>
> Is this referring to some `private-*.h` `public-*.h` files or what are those 
> public/private headers that are incorrectly included?

LLDB has lldb/include/lldb/Foo which (like in the other LLVM projects) are 
supposed to define a module's public interface from what I understand, while 
headers in lldb/source/Foo are Foo's internal headers. At least that's how it 
works in clang and llvm. In lldb, many modules include another module's private 
headers (in that sense that they're in lldb/source/Foo instead of in 
lldb/include/lldb/Foo), while that's much less common in llvm and clang.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109185/new/

https://reviews.llvm.org/D109185

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109832: [lldb/win] Fix TestIRMemoryMapWindows.test when running tests in git bash

2021-09-15 Thread Nico Weber via Phabricator via lldb-commits
thakis created this revision.
thakis added a reviewer: amccarth.
Herald added a subscriber: pengfei.
thakis requested review of this revision.

lit.util.which('link') picks up the wrong link.exe in git bash, leading
to this error:

1. command stderr: /usr/bin/link: extra operand '/LIBPATH:C:\\Program Files 
(x86)\\Windows Kits\\10\\lib\\10.0.17763.0\\ucrt\\x64' Try '/usr/bin/link 
--help' for more information.

Instead, assume that link.exe is next to cl.exe.


https://reviews.llvm.org/D109832

Files:
  lldb/test/Shell/helper/toolchain.py


Index: lldb/test/Shell/helper/toolchain.py
===
--- lldb/test/Shell/helper/toolchain.py
+++ lldb/test/Shell/helper/toolchain.py
@@ -90,11 +90,14 @@
 # detect the include and lib paths, and find cl.exe and link.exe and create
 # substitutions for each of them that explicitly specify /I and /L paths
 cl = lit.util.which('cl')
-link = lit.util.which('link')
 
-if not cl or not link:
+if not cl:
 return
 
+# Don't use lit.util.which() for link.exe: In `git bash`, it will pick
+# up /usr/bin/link (another name for ln).
+link = os.path.join(os.path.dirname(cl), 'link.exe')
+
 cl = '"' + cl + '"'
 link = '"' + link + '"'
 includes = os.getenv('INCLUDE', '').split(';')


Index: lldb/test/Shell/helper/toolchain.py
===
--- lldb/test/Shell/helper/toolchain.py
+++ lldb/test/Shell/helper/toolchain.py
@@ -90,11 +90,14 @@
 # detect the include and lib paths, and find cl.exe and link.exe and create
 # substitutions for each of them that explicitly specify /I and /L paths
 cl = lit.util.which('cl')
-link = lit.util.which('link')
 
-if not cl or not link:
+if not cl:
 return
 
+# Don't use lit.util.which() for link.exe: In `git bash`, it will pick
+# up /usr/bin/link (another name for ln).
+link = os.path.join(os.path.dirname(cl), 'link.exe')
+
 cl = '"' + cl + '"'
 link = '"' + link + '"'
 includes = os.getenv('INCLUDE', '').split(';')
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109834: [lldb/win] Improve check-lldb-shell with LLVM_ENABLE_DIA_SDK=NO

2021-09-15 Thread Nico Weber via Phabricator via lldb-commits
thakis created this revision.
thakis added a reviewer: amccarth.
thakis requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Before this change, running check-lldb-shell with LLVM_ENABLE_DIA_SDK=NO would 
fail ~25 tests.

This change adds a lit feature based on if the DIA SDK is available and 
annotates
all tests that set breakpoints with this new feature. Now these tests are 
skipped
(with a warning message during test startup) instead of failing. This matches 
how
this is handled in check-llvm.

(This doesn't touch API or Unit tests for now.)


https://reviews.llvm.org/D109834

Files:
  lldb/test/Shell/Breakpoint/case-insensitive.test
  lldb/test/Shell/Breakpoint/dummy-target.test
  lldb/test/Shell/Commands/command-thread-select.test
  lldb/test/Shell/Driver/TestSingleQuote.test
  lldb/test/Shell/Expr/TestIRMemoryMapWindows.test
  lldb/test/Shell/Expr/nodefaultlib.cpp
  lldb/test/Shell/Settings/TestFrameFormatColor.test
  lldb/test/Shell/Settings/TestFrameFormatNoColor.test
  lldb/test/Shell/Settings/TestLineMarkerColor.test
  lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp
  lldb/test/Shell/SymbolFile/PDB/lit.local.cfg
  lldb/test/Shell/Watchpoint/SetErrorCases.test
  lldb/test/Shell/lit.cfg.py
  lldb/test/Shell/lit.site.cfg.py.in
  llvm/utils/gn/secondary/lldb/test/BUILD.gn

Index: llvm/utils/gn/secondary/lldb/test/BUILD.gn
===
--- llvm/utils/gn/secondary/lldb/test/BUILD.gn
+++ llvm/utils/gn/secondary/lldb/test/BUILD.gn
@@ -1,6 +1,5 @@
+import("//llvm/lib/DebugInfo/PDB/enable_dia.gni")
 import("//llvm/triples.gni")
-
-#import("//llvm/utils/gn/build/libs/xar/enable.gni")
 import("//llvm/utils/gn/build/libs/xml/enable.gni")
 import("//llvm/utils/gn/build/libs/zlib/enable.gni")
 import("//llvm/utils/gn/build/write_cmake_config.gni")
@@ -109,6 +108,12 @@
 "LLVM_HOST_TRIPLE=$llvm_current_triple",
   ]
 
+  if (llvm_enable_dia_sdk) {
+extra_values += [ "LLVM_ENABLE_DIA_SDK=1" ]
+  } else {
+extra_values += [ "LLVM_ENABLE_DIA_SDK=0" ]  # Must be 0.
+  }
+
   if (llvm_enable_zlib) {
 extra_values += [ "LLVM_ENABLE_ZLIB=1" ]
   } else {
Index: lldb/test/Shell/lit.site.cfg.py.in
===
--- lldb/test/Shell/lit.site.cfg.py.in
+++ lldb/test/Shell/lit.site.cfg.py.in
@@ -16,6 +16,7 @@
 config.target_triple = "@TARGET_TRIPLE@"
 config.python_executable = "@Python3_EXECUTABLE@"
 config.have_zlib = @LLVM_ENABLE_ZLIB@
+config.have_dia_sdk = @LLVM_ENABLE_DIA_SDK@
 config.lldb_enable_lzma = @LLDB_ENABLE_LZMA@
 config.host_triple = "@LLVM_HOST_TRIPLE@"
 config.lldb_bitness = 64 if @LLDB_IS_64_BITS@ else 32
Index: lldb/test/Shell/lit.cfg.py
===
--- lldb/test/Shell/lit.cfg.py
+++ lldb/test/Shell/lit.cfg.py
@@ -56,6 +56,15 @@
   lit_config.note("Running Shell tests in {} mode.".format(lldb_repro_mode))
   toolchain.use_lldb_repro_substitutions(config, lldb_repro_mode)
 
+# Do DIA check early, so that the warning shows up above the config.py notes.
+if sys.platform != 'win32':
+  config.available_features.add('host-breakpoints')
+else:
+  if config.have_dia_sdk:
+config.available_features.add('host-breakpoints')
+  else:
+lit_config.warning('lldb built without DIA SDK, several tests will be skipped')
+
 llvm_config.use_default_substitutions()
 toolchain.use_lldb_substitutions(config)
 toolchain.use_support_substitutions(config)
Index: lldb/test/Shell/Watchpoint/SetErrorCases.test
===
--- lldb/test/Shell/Watchpoint/SetErrorCases.test
+++ lldb/test/Shell/Watchpoint/SetErrorCases.test
@@ -1,3 +1,4 @@
+# REQUIRES: host-breakpoints
 # RUN: %clangxx_host %p/Inputs/main.cpp -g -o %t.out
 # RUN: %lldb -b -o 'settings set interpreter.stop-command-source-on-error false' -s %s %t.out 2>&1 | FileCheck %s
 
Index: lldb/test/Shell/SymbolFile/PDB/lit.local.cfg
===
--- lldb/test/Shell/SymbolFile/PDB/lit.local.cfg
+++ lldb/test/Shell/SymbolFile/PDB/lit.local.cfg
@@ -1,2 +1,3 @@
-if 'lldb-repro' in config.available_features:
+if (not config.have_dia_sdk or
+'lldb-repro' in config.available_features):
   config.unsupported = True
Index: lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp
===
--- lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp
+++ lldb/test/Shell/SymbolFile/NativePDB/stack_unwinding01.cpp
@@ -1,5 +1,5 @@
 // clang-format off
-// REQUIRES: lld, system-windows
+// REQUIRES: lld, system-windows, host-breakpoints
 
 // RUN: %build --compiler=clang-cl --nodefaultlib -o %t.exe -- %s
 // RUN: env LLDB_USE_NATIVE_PDB_READER=1 %lldb -f %t.exe -s \
Index: lldb/test/Shell/Settings/TestLineMarkerColor.test
==

[Lldb-commits] [PATCH] D109834: [lldb/win] Improve check-lldb-shell with LLVM_ENABLE_DIA_SDK=NO

2021-09-16 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

In D109834#3003250 , @labath wrote:

> I fear this is going to be an endless whack-a-mole. There's no way every 
> contributor will remember to (correctly) add this feature.

I think that's ok. 10/250 shell tests need it and there isn't a ton of churn in 
these tests, so folks on windows can update it as needed.

(If you have a better idea, I'm all ears of course.)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109834/new/

https://reviews.llvm.org/D109834

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109832: [lldb/win] Fix TestIRMemoryMapWindows.test when running tests in git bash

2021-09-16 Thread Nico Weber via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG99ece01a0f57: [lldb/win] Fix TestIRMemoryMapWindows.test 
when running tests in git bash (authored by thakis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109832/new/

https://reviews.llvm.org/D109832

Files:
  lldb/test/Shell/helper/toolchain.py


Index: lldb/test/Shell/helper/toolchain.py
===
--- lldb/test/Shell/helper/toolchain.py
+++ lldb/test/Shell/helper/toolchain.py
@@ -90,11 +90,14 @@
 # detect the include and lib paths, and find cl.exe and link.exe and create
 # substitutions for each of them that explicitly specify /I and /L paths
 cl = lit.util.which('cl')
-link = lit.util.which('link')
 
-if not cl or not link:
+if not cl:
 return
 
+# Don't use lit.util.which() for link.exe: In `git bash`, it will pick
+# up /usr/bin/link (another name for ln).
+link = os.path.join(os.path.dirname(cl), 'link.exe')
+
 cl = '"' + cl + '"'
 link = '"' + link + '"'
 includes = os.getenv('INCLUDE', '').split(';')


Index: lldb/test/Shell/helper/toolchain.py
===
--- lldb/test/Shell/helper/toolchain.py
+++ lldb/test/Shell/helper/toolchain.py
@@ -90,11 +90,14 @@
 # detect the include and lib paths, and find cl.exe and link.exe and create
 # substitutions for each of them that explicitly specify /I and /L paths
 cl = lit.util.which('cl')
-link = lit.util.which('link')
 
-if not cl or not link:
+if not cl:
 return
 
+# Don't use lit.util.which() for link.exe: In `git bash`, it will pick
+# up /usr/bin/link (another name for ln).
+link = os.path.join(os.path.dirname(cl), 'link.exe')
+
 cl = '"' + cl + '"'
 link = '"' + link + '"'
 includes = os.getenv('INCLUDE', '').split(';')
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109834: [lldb/win] Improve check-lldb-shell with LLVM_ENABLE_DIA_SDK=NO

2021-09-20 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Oh, that's a good idea. But even if I force on the native PDB reader if 
LLVM_ENABLE_DIA_SDK is false [1], I still get 15 failures. That's better than 
27, but it's more than 0. Maybe LLDB_USE_NATIVE_PDB_READER doesn't hit all uses 
of DIA in lldb?

  Failed Tests (15):
lldb-shell :: Driver/TestSingleQuote.test
lldb-shell :: Expr/nodefaultlib.cpp
lldb-shell :: SymbolFile/NativePDB/stack_unwinding01.cpp
lldb-shell :: SymbolFile/PDB/ast-restore.test
lldb-shell :: SymbolFile/PDB/calling-conventions.test
lldb-shell :: SymbolFile/PDB/class-layout.test
lldb-shell :: SymbolFile/PDB/enums-layout.test
lldb-shell :: SymbolFile/PDB/expressions.test
lldb-shell :: SymbolFile/PDB/func-symbols.test
lldb-shell :: SymbolFile/PDB/function-nested-block.test
lldb-shell :: SymbolFile/PDB/pointers.test
lldb-shell :: SymbolFile/PDB/type-quals.test
lldb-shell :: SymbolFile/PDB/typedefs.test
lldb-shell :: SymbolFile/PDB/udt-layout.test
lldb-shell :: SymbolFile/PDB/variables.test
  
  
  Testing Time: 38.91s
Unsupported  : 1113
Passed   :  263
Expectedly Failed:   14
Failed   :   15

1:

  C:\src\llvm-project>git diff
  diff --git a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp 
b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cppindex 
794fab5f7309..51c74c59b137 100644
  --- a/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
  +++ b/lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
  @@ -52,6 +52,10 @@
   #include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h"
   #include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h"
  
  +#if defined(_WIN32)
  +#include "llvm/Config/config.h"
  +#endif
  +
   using namespace lldb;
   using namespace lldb_private;
   using namespace llvm::pdb;
  @@ -83,6 +87,7 @@ bool ShouldAddLine(uint32_t requested_line, uint32_t 
actual_line,
  
   static bool ShouldUseNativeReader() {
   #if defined(_WIN32)
  +#if LLVM_ENABLE_DIA_SDK
 llvm::StringRef use_native = ::getenv("LLDB_USE_NATIVE_PDB_READER");
 return use_native.equals_insensitive("on") ||
use_native.equals_insensitive("yes") ||
  @@ -91,6 +96,9 @@ static bool ShouldUseNativeReader() {
   #else
 return true;
   #endif
  +#else
  +  return true;
  +#endif
   }
  
   void SymbolFilePDB::Initialize() {


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109834/new/

https://reviews.llvm.org/D109834

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D110172: [lldb/win] Default to native PDB reader when building with LLVM_ENABLE_DIA_SDK=NO

2021-09-21 Thread Nico Weber via Phabricator via lldb-commits
thakis created this revision.
thakis added reviewers: labath, amccarth.
thakis added a project: LLDB.
Herald added a subscriber: JDevlieghere.
thakis requested review of this revision.

Trying to use the DIA SDK reader only to fail with "DIA SDK wasn't enabled"
isn't very useful. The native PDB reader is missing some stuff, but it's
still better than nothing.

Reduces number of lldb-check-shell test failures with LLVM_ENABLE_DIA_SDK=NO 
from
27 to 15.


https://reviews.llvm.org/D110172

Files:
  lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp


Index: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
===
--- lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -52,6 +52,10 @@
 #include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h"
 #include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h"
 
+#if defined(_WIN32)
+#include "llvm/Config/config.h"
+#endif
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace llvm::pdb;
@@ -83,6 +87,7 @@
 
 static bool ShouldUseNativeReader() {
 #if defined(_WIN32)
+#if LLVM_ENABLE_DIA_SDK
   llvm::StringRef use_native = ::getenv("LLDB_USE_NATIVE_PDB_READER");
   return use_native.equals_insensitive("on") ||
  use_native.equals_insensitive("yes") ||
@@ -91,6 +96,9 @@
 #else
   return true;
 #endif
+#else
+  return true;
+#endif
 }
 
 void SymbolFilePDB::Initialize() {


Index: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
===
--- lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -52,6 +52,10 @@
 #include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h"
 #include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h"
 
+#if defined(_WIN32)
+#include "llvm/Config/config.h"
+#endif
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace llvm::pdb;
@@ -83,6 +87,7 @@
 
 static bool ShouldUseNativeReader() {
 #if defined(_WIN32)
+#if LLVM_ENABLE_DIA_SDK
   llvm::StringRef use_native = ::getenv("LLDB_USE_NATIVE_PDB_READER");
   return use_native.equals_insensitive("on") ||
  use_native.equals_insensitive("yes") ||
@@ -91,6 +96,9 @@
 #else
   return true;
 #endif
+#else
+  return true;
+#endif
 }
 
 void SymbolFilePDB::Initialize() {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D109834: [lldb/win] Improve check-lldb-shell with LLVM_ENABLE_DIA_SDK=NO

2021-09-21 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Well, it's a start, so let's land that part (D110172 
).


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109834/new/

https://reviews.llvm.org/D109834

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D110172: [lldb/win] Default to native PDB reader when building with LLVM_ENABLE_DIA_SDK=NO

2021-09-21 Thread Nico Weber via Phabricator via lldb-commits
thakis updated this revision to Diff 373909.
thakis added a comment.

slightly simpler preprocessor goop


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110172/new/

https://reviews.llvm.org/D110172

Files:
  lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp


Index: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
===
--- lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -52,6 +52,10 @@
 #include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h"
 #include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h"
 
+#if defined(_WIN32)
+#include "llvm/Config/config.h"
+#endif
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace llvm::pdb;
@@ -83,14 +87,16 @@
 
 static bool ShouldUseNativeReader() {
 #if defined(_WIN32)
+#if LLVM_ENABLE_DIA_SDK
   llvm::StringRef use_native = ::getenv("LLDB_USE_NATIVE_PDB_READER");
-  return use_native.equals_insensitive("on") ||
- use_native.equals_insensitive("yes") ||
- use_native.equals_insensitive("1") ||
- use_native.equals_insensitive("true");
-#else
-  return true;
+  if (use_native.equals_insensitive("on") ||
+  use_native.equals_insensitive("yes") ||
+  use_native.equals_insensitive("1") ||
+  use_native.equals_insensitive("true"))
+return false;
+#endif
 #endif
+  return true;
 }
 
 void SymbolFilePDB::Initialize() {


Index: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
===
--- lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -52,6 +52,10 @@
 #include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h"
 #include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h"
 
+#if defined(_WIN32)
+#include "llvm/Config/config.h"
+#endif
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace llvm::pdb;
@@ -83,14 +87,16 @@
 
 static bool ShouldUseNativeReader() {
 #if defined(_WIN32)
+#if LLVM_ENABLE_DIA_SDK
   llvm::StringRef use_native = ::getenv("LLDB_USE_NATIVE_PDB_READER");
-  return use_native.equals_insensitive("on") ||
- use_native.equals_insensitive("yes") ||
- use_native.equals_insensitive("1") ||
- use_native.equals_insensitive("true");
-#else
-  return true;
+  if (use_native.equals_insensitive("on") ||
+  use_native.equals_insensitive("yes") ||
+  use_native.equals_insensitive("1") ||
+  use_native.equals_insensitive("true"))
+return false;
+#endif
 #endif
+  return true;
 }
 
 void SymbolFilePDB::Initialize() {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D110172: [lldb/win] Default to native PDB reader when building with LLVM_ENABLE_DIA_SDK=NO

2021-09-21 Thread Nico Weber via Phabricator via lldb-commits
thakis updated this revision to Diff 373910.
thakis added a comment.

slightly nicer preprocessor goop in more correct


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110172/new/

https://reviews.llvm.org/D110172

Files:
  lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp


Index: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
===
--- lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -52,6 +52,10 @@
 #include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h"
 #include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h"
 
+#if defined(_WIN32)
+#include "llvm/Config/config.h"
+#endif
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace llvm::pdb;
@@ -83,14 +87,16 @@
 
 static bool ShouldUseNativeReader() {
 #if defined(_WIN32)
+#if LLVM_ENABLE_DIA_SDK
   llvm::StringRef use_native = ::getenv("LLDB_USE_NATIVE_PDB_READER");
-  return use_native.equals_insensitive("on") ||
- use_native.equals_insensitive("yes") ||
- use_native.equals_insensitive("1") ||
- use_native.equals_insensitive("true");
-#else
-  return true;
+  if (!use_native.equals_insensitive("on") &&
+  !use_native.equals_insensitive("yes") &&
+  !use_native.equals_insensitive("1") &&
+  !use_native.equals_insensitive("true"))
+return false;
+#endif
 #endif
+  return true;
 }
 
 void SymbolFilePDB::Initialize() {


Index: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
===
--- lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -52,6 +52,10 @@
 #include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h"
 #include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h"
 
+#if defined(_WIN32)
+#include "llvm/Config/config.h"
+#endif
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace llvm::pdb;
@@ -83,14 +87,16 @@
 
 static bool ShouldUseNativeReader() {
 #if defined(_WIN32)
+#if LLVM_ENABLE_DIA_SDK
   llvm::StringRef use_native = ::getenv("LLDB_USE_NATIVE_PDB_READER");
-  return use_native.equals_insensitive("on") ||
- use_native.equals_insensitive("yes") ||
- use_native.equals_insensitive("1") ||
- use_native.equals_insensitive("true");
-#else
-  return true;
+  if (!use_native.equals_insensitive("on") &&
+  !use_native.equals_insensitive("yes") &&
+  !use_native.equals_insensitive("1") &&
+  !use_native.equals_insensitive("true"))
+return false;
+#endif
 #endif
+  return true;
 }
 
 void SymbolFilePDB::Initialize() {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D110172: [lldb/win] Default to native PDB reader when building with LLVM_ENABLE_DIA_SDK=NO

2021-09-21 Thread Nico Weber via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG908c11544212: [lldb/win] Default to native PDB reader when 
LLVM_ENABLE_DIA_SDK=NO (authored by thakis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D110172/new/

https://reviews.llvm.org/D110172

Files:
  lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp


Index: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
===
--- lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -52,6 +52,10 @@
 #include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h"
 #include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h"
 
+#if defined(_WIN32)
+#include "llvm/Config/config.h"
+#endif
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace llvm::pdb;
@@ -83,14 +87,16 @@
 
 static bool ShouldUseNativeReader() {
 #if defined(_WIN32)
+#if LLVM_ENABLE_DIA_SDK
   llvm::StringRef use_native = ::getenv("LLDB_USE_NATIVE_PDB_READER");
-  return use_native.equals_insensitive("on") ||
- use_native.equals_insensitive("yes") ||
- use_native.equals_insensitive("1") ||
- use_native.equals_insensitive("true");
-#else
-  return true;
+  if (!use_native.equals_insensitive("on") &&
+  !use_native.equals_insensitive("yes") &&
+  !use_native.equals_insensitive("1") &&
+  !use_native.equals_insensitive("true"))
+return false;
+#endif
 #endif
+  return true;
 }
 
 void SymbolFilePDB::Initialize() {


Index: lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
===
--- lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
+++ lldb/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
@@ -52,6 +52,10 @@
 #include "Plugins/Language/CPlusPlus/MSVCUndecoratedNameParser.h"
 #include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h"
 
+#if defined(_WIN32)
+#include "llvm/Config/config.h"
+#endif
+
 using namespace lldb;
 using namespace lldb_private;
 using namespace llvm::pdb;
@@ -83,14 +87,16 @@
 
 static bool ShouldUseNativeReader() {
 #if defined(_WIN32)
+#if LLVM_ENABLE_DIA_SDK
   llvm::StringRef use_native = ::getenv("LLDB_USE_NATIVE_PDB_READER");
-  return use_native.equals_insensitive("on") ||
- use_native.equals_insensitive("yes") ||
- use_native.equals_insensitive("1") ||
- use_native.equals_insensitive("true");
-#else
-  return true;
+  if (!use_native.equals_insensitive("on") &&
+  !use_native.equals_insensitive("yes") &&
+  !use_native.equals_insensitive("1") &&
+  !use_native.equals_insensitive("true"))
+return false;
+#endif
 #endif
+  return true;
 }
 
 void SymbolFilePDB::Initialize() {
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D111816: [lldb] Remove logging from Platform::~Platform

2021-10-14 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

http://45.33.8.238/mac/37050/step_4.txt

  In file included from 
../../lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp:9:
  In file included from 
../../lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.h:12:
  In file included from 
../../../chrome/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/map:495:
  In file included from 
../../../chrome/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/__node_handle:63:
  In file included from 
../../../chrome/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/memory:682:
  In file included from 
../../../chrome/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/__memory/shared_ptr.h:25:
  
../../../chrome/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/__memory/unique_ptr.h:50:19:
 error: invalid application of 'sizeof' to an incomplete type 
'lldb_private::ModuleCache'
  static_assert(sizeof(_Tp) > 0,
^~~
  
../../../chrome/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/__memory/unique_ptr.h:315:7:
 note: in instantiation of member function 
'std::default_delete::operator()' requested here
__ptr_.second()(__tmp);
^
  
../../../chrome/src/third_party/llvm-build/Release+Asserts/bin/../include/c++/v1/__memory/unique_ptr.h:269:19:
 note: in instantiation of member function 
'std::unique_ptr::reset' requested here
~unique_ptr() { reset(); }
^
  ../../lldb/include/lldb/Target/Platform.h:78:3: note: in instantiation of 
member function 'std::unique_ptr::~unique_ptr' 
requested here
~Platform() override = default;
^
  ../../lldb/include/lldb/Target/Platform.h:39:7: note: forward declaration of 
'lldb_private::ModuleCache'
  class ModuleCache;
^


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111816/new/

https://reviews.llvm.org/D111816

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D111715: [WIP] [lldb] change name demangling to be consistent between windows and linx

2021-10-16 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

I don't have an opinion on this change and I don't mind the demangler change, 
but isn't the type information helpful? The mangled itanium name doesn't 
include type information which is why it's not printed, but the mangled ms name 
does include it.

But as I said, I don't have an opinion either way.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111715/new/

https://reviews.llvm.org/D111715

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D111890: [lldb] [Host] Make Terminal methods return llvm::Error

2021-10-27 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.
Herald added a subscriber: JDevlieghere.

This causes lots of warnings on Windows, where TERMIOS is false: 
http://45.33.8.238/win/47744/step_4.txt (look for "Terminal.cpp"). Could you 
take a look? It looks like return statements are genuinely missing there.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111890/new/

https://reviews.llvm.org/D111890

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D111890: [lldb] [Host] Make Terminal methods return llvm::Error

2021-10-28 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

In D111890#3090653 , @mgorny wrote:

> In D111890#3090632 , @thakis wrote:
>
>> This causes lots of warnings on Windows, where TERMIOS is false: 
>> http://45.33.8.238/win/47744/step_4.txt (look for "Terminal.cpp"). Could you 
>> take a look? It looks like return statements are genuinely missing there.
>
> When `LLDB_ENABLE_TERMIOS` is false, `GetData()` always returns an error, so 
> the code below should not be reachable. I suppose I could add 
> `llvm_unreachable()` for that. I'll try that and make a diff if it works.

Maybe it'd be easier to read if you move

  return llvm::createStringError(llvm::inconvertibleErrorCode(),
 "termios support missing in LLDB");

into some function and then do

  llvm::Error Terminal::SetCanonical(bool enabled) {
  #if LLDB_ENABLE_TERMIOS
...actual body...
  #else
return ThatErrorFunction();
  #endif
  ``
  
  (etc) in all the functions instead of hiding it in GetData()? Then it's 
obvious in every function what's going on.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111890/new/

https://reviews.llvm.org/D111890

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D112632: [lldb] [Host/Terminal] Fix warnings with termios disabled

2021-10-28 Thread Nico Weber via Phabricator via lldb-commits
thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.

Thanks!




Comment at: lldb/source/Host/common/Terminal.cpp:39
+
 llvm::Expected Terminal::GetData() {
   if (!FileDescriptorIsValid())

nit: should GetData() even exist if `!LLDB_ENABLE_TERMIOS`? Looks like it's 
only called `#if LLDB_ENABLE_TERMIOS` now. Maybe the whole method definition 
should be inside an ifdef.

If it should keep existing, either move the !FileDescriptorIsValid() check into 
the #if inside it (imho preferred), or move all the callers of it outside that 
#if. The current mix is a bit self-inconsistent.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D112632/new/

https://reviews.llvm.org/D112632

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D102757: [lldb] Remove non address bits when looking up memory regions

2021-11-03 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Looks like this breaks the build on Windows: 
http://45.33.8.238/win/48210/step_4.txt

Please take a look.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102757/new/

https://reviews.llvm.org/D102757

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133534: Complete support of loading a darwin kernel over a live gdb-remote connection given the address of a mach-o fileset

2022-09-09 Thread Nico Weber via Phabricator via lldb-commits
thakis added inline comments.



Comment at: lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt:47
 lldbUtility
+lldbPluginDynamicLoaderDarwinKernel
+lldbPluginObjectContainerMachOFileset

This causes a dependency cycle:

  //lldb/source/Plugins/Platform/MacOSX:MacOSX ->
  //lldb/source/Plugins/DynamicLoader/Darwin-Kernel:Darwin-Kernel ->
  //lldb/source/Plugins/Platform/MacOSX:MacOSX


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133534/new/

https://reviews.llvm.org/D133534

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D133534: Complete support of loading a darwin kernel over a live gdb-remote connection given the address of a mach-o fileset

2022-09-13 Thread Nico Weber via Phabricator via lldb-commits
thakis added inline comments.



Comment at: lldb/source/Plugins/Platform/MacOSX/CMakeLists.txt:47
 lldbUtility
+lldbPluginDynamicLoaderDarwinKernel
+lldbPluginObjectContainerMachOFileset

jasonmolenda wrote:
> jasonmolenda wrote:
> > thakis wrote:
> > > This causes a dependency cycle:
> > > 
> > >   //lldb/source/Plugins/Platform/MacOSX:MacOSX ->
> > >   //lldb/source/Plugins/DynamicLoader/Darwin-Kernel:Darwin-Kernel ->
> > >   //lldb/source/Plugins/Platform/MacOSX:MacOSX
> > Ach, naturally.  DynamicLoaderDarwinKernel has to create a 
> > PlatformDarwinKernel to set in the Target when it is initializing itself.  
> > :/  Maybe I'll just add DynamicLoaderDarwinKernel to the unit tests that 
> > have PlatformMacOSX in them.
> I removed the dependency in DynamicLoaderDarwinKernel, a very specialized 
> plugin, and left the dependency in PlatformMacOSX which includes all of the 
> darwin platforms and is a common one to import.  I believe any target that is 
> linking against DynamicLoaderDarwinKernel will also have a dependency on 
> PlatformMacOSX already.  I landed this as 
> 30578c08568bc8de79dea72e41f49899ba10ea55 to make sure this causes no 
> problems, we can fix it better if someone has a suggestion.
Thanks!

> I believe anything linking the darwin kernel DynamicLoader plugin
> will already have lldbPluginPlatformMacOSX in its dependency list,
> so not explicitly expressing this dependency is safe.

That sounds like it doesn't really remove the dependency, it just lies about 
the build system about it and things still happen to work :)

Normally, if you have a cycle between libraries A and B, you'd either:

- decide which of the two should depend on the other
- make the "lower" library expose some virtual delegate
- implement that in the "higher" library

…or move the needed shared bits to an even lower library that both A and B 
naturally depend on already.

https://chromium.googlesource.com/chromium/src/+/lkgr/docs/patterns/inversion-of-control.md
 has some (slightly, but not overly so) chromium-specific notes on this.

But layering in lldb is generally a mess, so I think your workaround is ok for 
now. It'd be nice to clean up lldb's layering at some point!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133534/new/

https://reviews.llvm.org/D133534

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D134333: When there are variable errors, display an error in VS Code's local variables view.

2022-09-28 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

This breaks building everywhere:
http://45.33.8.238/linux/87654/step_4.txt
http://45.33.8.238/macm1/45381/step_4.txt
http://45.33.8.238/win/67047/step_4.txt

  ../../lldb/tools/lldb-vscode/lldb-vscode.cpp(2963,7): error: unknown type 
name 'SBError'; did you mean 'lldb::SBError'?
SBError error = top_scope->GetError();
^~~
lldb::SBError
  ../../lldb/include\lldb/API/SBError.h(20,16): note: 'lldb::SBError' declared 
here
  class LLDB_API SBError {
 ^
  1 error generated.

Please take a look, and revert for now if it takes a while to fix.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134333/new/

https://reviews.llvm.org/D134333

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D134333: When there are variable errors, display an error in VS Code's local variables view.

2022-09-28 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

Reverted in dcb94010eb8f0110c593a41e90b01365b45795e6 for now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134333/new/

https://reviews.llvm.org/D134333

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D134844: [lldb] Fix deprecation warning for using std::iterator

2022-09-28 Thread Nico Weber via Phabricator via lldb-commits
thakis created this revision.
thakis added a reviewer: labath.
Herald added a project: All.
thakis requested review of this revision.

std::iterator was deprecated in C++17.


https://reviews.llvm.org/D134844

Files:
  lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp


Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
@@ -14,6 +14,8 @@
 #include "DWARFDeclContext.h"
 #include "DWARFUnit.h"
 
+#include "llvm/ADT/iterator.h"
+
 using namespace lldb_private;
 using namespace lldb_private::dwarf;
 
@@ -24,7 +26,9 @@
 /// convenience, the starting die is included in the sequence as the first
 /// item.
 class ElaboratingDIEIterator
-: public std::iterator {
+: public llvm::iterator_facade_base<
+  ElaboratingDIEIterator, std::input_iterator_tag, DWARFDIE,
+  std::ptrdiff_t, DWARFDIE *, DWARFDIE *> {
 
   // The operating invariant is: top of m_worklist contains the "current" item
   // and the rest of the list are items yet to be visited. An empty worklist
@@ -62,11 +66,6 @@
 Next();
 return *this;
   }
-  ElaboratingDIEIterator operator++(int) {
-ElaboratingDIEIterator I = *this;
-Next();
-return I;
-  }
 
   friend bool operator==(const ElaboratingDIEIterator &a,
  const ElaboratingDIEIterator &b) {
@@ -74,10 +73,6 @@
   return a.m_worklist.empty() == b.m_worklist.empty();
 return a.m_worklist.back() == b.m_worklist.back();
   }
-  friend bool operator!=(const ElaboratingDIEIterator &a,
- const ElaboratingDIEIterator &b) {
-return !(a == b);
-  }
 };
 
 llvm::iterator_range


Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
@@ -14,6 +14,8 @@
 #include "DWARFDeclContext.h"
 #include "DWARFUnit.h"
 
+#include "llvm/ADT/iterator.h"
+
 using namespace lldb_private;
 using namespace lldb_private::dwarf;
 
@@ -24,7 +26,9 @@
 /// convenience, the starting die is included in the sequence as the first
 /// item.
 class ElaboratingDIEIterator
-: public std::iterator {
+: public llvm::iterator_facade_base<
+  ElaboratingDIEIterator, std::input_iterator_tag, DWARFDIE,
+  std::ptrdiff_t, DWARFDIE *, DWARFDIE *> {
 
   // The operating invariant is: top of m_worklist contains the "current" item
   // and the rest of the list are items yet to be visited. An empty worklist
@@ -62,11 +66,6 @@
 Next();
 return *this;
   }
-  ElaboratingDIEIterator operator++(int) {
-ElaboratingDIEIterator I = *this;
-Next();
-return I;
-  }
 
   friend bool operator==(const ElaboratingDIEIterator &a,
  const ElaboratingDIEIterator &b) {
@@ -74,10 +73,6 @@
   return a.m_worklist.empty() == b.m_worklist.empty();
 return a.m_worklist.back() == b.m_worklist.back();
   }
-  friend bool operator!=(const ElaboratingDIEIterator &a,
- const ElaboratingDIEIterator &b) {
-return !(a == b);
-  }
 };
 
 llvm::iterator_range
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D134844: [lldb] Fix deprecation warning for using std::iterator

2022-09-30 Thread Nico Weber via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa314a36aaa1d: [lldb] Fix deprecation warning for using 
std::iterator (authored by thakis).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134844/new/

https://reviews.llvm.org/D134844

Files:
  lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp


Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
@@ -14,6 +14,8 @@
 #include "DWARFDeclContext.h"
 #include "DWARFUnit.h"
 
+#include "llvm/ADT/iterator.h"
+
 using namespace lldb_private;
 using namespace lldb_private::dwarf;
 
@@ -24,7 +26,9 @@
 /// convenience, the starting die is included in the sequence as the first
 /// item.
 class ElaboratingDIEIterator
-: public std::iterator {
+: public llvm::iterator_facade_base<
+  ElaboratingDIEIterator, std::input_iterator_tag, DWARFDIE,
+  std::ptrdiff_t, DWARFDIE *, DWARFDIE *> {
 
   // The operating invariant is: top of m_worklist contains the "current" item
   // and the rest of the list are items yet to be visited. An empty worklist
@@ -62,11 +66,6 @@
 Next();
 return *this;
   }
-  ElaboratingDIEIterator operator++(int) {
-ElaboratingDIEIterator I = *this;
-Next();
-return I;
-  }
 
   friend bool operator==(const ElaboratingDIEIterator &a,
  const ElaboratingDIEIterator &b) {
@@ -74,10 +73,6 @@
   return a.m_worklist.empty() == b.m_worklist.empty();
 return a.m_worklist.back() == b.m_worklist.back();
   }
-  friend bool operator!=(const ElaboratingDIEIterator &a,
- const ElaboratingDIEIterator &b) {
-return !(a == b);
-  }
 };
 
 llvm::iterator_range


Index: lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp
@@ -14,6 +14,8 @@
 #include "DWARFDeclContext.h"
 #include "DWARFUnit.h"
 
+#include "llvm/ADT/iterator.h"
+
 using namespace lldb_private;
 using namespace lldb_private::dwarf;
 
@@ -24,7 +26,9 @@
 /// convenience, the starting die is included in the sequence as the first
 /// item.
 class ElaboratingDIEIterator
-: public std::iterator {
+: public llvm::iterator_facade_base<
+  ElaboratingDIEIterator, std::input_iterator_tag, DWARFDIE,
+  std::ptrdiff_t, DWARFDIE *, DWARFDIE *> {
 
   // The operating invariant is: top of m_worklist contains the "current" item
   // and the rest of the list are items yet to be visited. An empty worklist
@@ -62,11 +66,6 @@
 Next();
 return *this;
   }
-  ElaboratingDIEIterator operator++(int) {
-ElaboratingDIEIterator I = *this;
-Next();
-return I;
-  }
 
   friend bool operator==(const ElaboratingDIEIterator &a,
  const ElaboratingDIEIterator &b) {
@@ -74,10 +73,6 @@
   return a.m_worklist.empty() == b.m_worklist.empty();
 return a.m_worklist.back() == b.m_worklist.back();
   }
-  friend bool operator!=(const ElaboratingDIEIterator &a,
- const ElaboratingDIEIterator &b) {
-return !(a == b);
-  }
 };
 
 llvm::iterator_range
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D135983: [lldb] Fix a -Wdeprecated-declarations warning

2022-10-14 Thread Nico Weber via Phabricator via lldb-commits
thakis created this revision.
thakis added a reviewer: JDevlieghere.
Herald added a project: All.
thakis requested review of this revision.

Fixes:

  ../../lldb/source/Symbol/LocateSymbolFileMacOSX.cpp:633:26:
  warning: 'CFPropertyListCreateFromXMLData' is deprecated:
   first deprecated in macOS 10.10 -
   Use CFPropertyListCreateWithData instead.
   [-Wdeprecated-declarations]
  (CFDictionaryRef)::CFPropertyListCreateFromXMLData(
 ^

Hopefully no behavior change.


https://reviews.llvm.org/D135983

Files:
  lldb/source/Symbol/LocateSymbolFileMacOSX.cpp


Index: lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
===
--- lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
+++ lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
@@ -630,8 +630,8 @@
   command_output.size(), kCFAllocatorNull));
 
   CFCReleaser plist(
-  (CFDictionaryRef)::CFPropertyListCreateFromXMLData(
-  NULL, data.get(), kCFPropertyListImmutable, NULL));
+  (CFDictionaryRef)::CFPropertyListCreateWithData(
+  NULL, data.get(), kCFPropertyListImmutable, NULL, NULL));
 
   if (!plist.get()) {
 LLDB_LOGF(log, "'%s' failed: output is not a valid plist",


Index: lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
===
--- lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
+++ lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
@@ -630,8 +630,8 @@
   command_output.size(), kCFAllocatorNull));
 
   CFCReleaser plist(
-  (CFDictionaryRef)::CFPropertyListCreateFromXMLData(
-  NULL, data.get(), kCFPropertyListImmutable, NULL));
+  (CFDictionaryRef)::CFPropertyListCreateWithData(
+  NULL, data.get(), kCFPropertyListImmutable, NULL, NULL));
 
   if (!plist.get()) {
 LLDB_LOGF(log, "'%s' failed: output is not a valid plist",
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D135983: [lldb] Fix a -Wdeprecated-declarations warning

2022-10-26 Thread Nico Weber via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG0af7280a5ee0: [lldb] Fix a -Wdeprecated-declarations warning 
(authored by thakis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D135983/new/

https://reviews.llvm.org/D135983

Files:
  lldb/source/Symbol/LocateSymbolFileMacOSX.cpp


Index: lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
===
--- lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
+++ lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
@@ -630,8 +630,8 @@
   command_output.size(), kCFAllocatorNull));
 
   CFCReleaser plist(
-  (CFDictionaryRef)::CFPropertyListCreateFromXMLData(
-  NULL, data.get(), kCFPropertyListImmutable, NULL));
+  (CFDictionaryRef)::CFPropertyListCreateWithData(
+  NULL, data.get(), kCFPropertyListImmutable, NULL, NULL));
 
   if (!plist.get()) {
 LLDB_LOGF(log, "'%s' failed: output is not a valid plist",


Index: lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
===
--- lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
+++ lldb/source/Symbol/LocateSymbolFileMacOSX.cpp
@@ -630,8 +630,8 @@
   command_output.size(), kCFAllocatorNull));
 
   CFCReleaser plist(
-  (CFDictionaryRef)::CFPropertyListCreateFromXMLData(
-  NULL, data.get(), kCFPropertyListImmutable, NULL));
+  (CFDictionaryRef)::CFPropertyListCreateWithData(
+  NULL, data.get(), kCFPropertyListImmutable, NULL, NULL));
 
   if (!plist.get()) {
 LLDB_LOGF(log, "'%s' failed: output is not a valid plist",
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D137217: [LTO][COFF] Use bitcode file names in lto native object file names.

2022-11-22 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

This doesn't build:
http://45.33.8.238/win/70474/step_4.txt
http://45.33.8.238/linux/92146/step_4.txt

Please take a look and revert for now if it takes a while to fix.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137217/new/

https://reviews.llvm.org/D137217

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D102092: [lldb] Enable -Wmisleading-indentation

2021-06-03 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

In D102092#2771746 , @kastiglione 
wrote:

> @thakis thanks for pointing that out. I had tried `-Wall` using the clang 
> included with the latest version of Xcode, and that does not enable 
> `-Wmisleading-indentation`. I see from the compiler explorer that recent 
> clang versions do include misleading indentation diagnostics with `-Wall`. It 
> seems worth keeping in until an Xcode release includes it with `-Wall`.

Thanks for pointing this out, I didn't know Xcode's clang has a different 
`-Wall` set than normal clang. I agree it makes sense to opt in to this then.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D102092/new/

https://reviews.llvm.org/D102092

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D103349: [lldb] Don't print script output twice in HandleCommand

2021-06-25 Thread Nico Weber via Phabricator via lldb-commits
thakis added inline comments.



Comment at: lldb/lldb/test/Shell/Breakpoint/breakpoint-command.test:1
+# RUN: %build %p/Inputs/dummy-target.c -o %t.out
+# RUN: %lldb %t.out -o 'b main' -o 'break command add 1 -o "script print(95000 
+ 126)"' -o 'r'

Did you mean to put this file in 
lldb/lldb/test/Shell/Breakpoint/breakpoint-command.test or should it be in 
lldb/test/Shell/Breakpoint/breakpoint-command.test (just one "lldb/")?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D103349/new/

https://reviews.llvm.org/D103349

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D107255: [lldb] Get rid of HAVE_SIGACTION

2021-08-02 Thread Nico Weber via Phabricator via lldb-commits
thakis created this revision.
thakis added a reviewer: JDevlieghere.
thakis added a project: LLDB.
Herald added a subscriber: mgorny.
thakis requested review of this revision.

The .cpp file uses SIGNAL_POLLING_UNSUPPORTED to guard the call
to sigaction, so use it in the .h file too. (LLVM also calls
sigaction without a guard on non-Windows.)

No behavior change.


https://reviews.llvm.org/D107255

Files:
  lldb/cmake/modules/LLDBGenerateConfig.cmake
  lldb/include/lldb/Host/Config.h.cmake
  lldb/include/lldb/Host/MainLoop.h


Index: lldb/include/lldb/Host/MainLoop.h
===
--- lldb/include/lldb/Host/MainLoop.h
+++ lldb/include/lldb/Host/MainLoop.h
@@ -95,7 +95,7 @@
 
   struct SignalInfo {
 std::list callbacks;
-#if HAVE_SIGACTION
+#ifndef SIGNAL_POLLING_UNSUPPORTED
 struct sigaction old_action;
 #endif
 bool was_blocked : 1;
Index: lldb/include/lldb/Host/Config.h.cmake
===
--- lldb/include/lldb/Host/Config.h.cmake
+++ lldb/include/lldb/Host/Config.h.cmake
@@ -22,8 +22,6 @@
 
 #cmakedefine01 HAVE_PTSNAME_R
 
-#cmakedefine01 HAVE_SIGACTION
-
 #cmakedefine01 HAVE_PROCESS_VM_READV
 
 #cmakedefine01 HAVE_NR_PROCESS_VM_READV
Index: lldb/cmake/modules/LLDBGenerateConfig.cmake
===
--- lldb/cmake/modules/LLDBGenerateConfig.cmake
+++ lldb/cmake/modules/LLDBGenerateConfig.cmake
@@ -9,7 +9,6 @@
 check_symbol_exists(ppoll poll.h HAVE_PPOLL)
 check_symbol_exists(ptsname_r stdlib.h HAVE_PTSNAME_R)
 set(CMAKE_REQUIRED_DEFINITIONS)
-check_symbol_exists(sigaction signal.h HAVE_SIGACTION)
 check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
 
 check_include_file(termios.h HAVE_TERMIOS_H)


Index: lldb/include/lldb/Host/MainLoop.h
===
--- lldb/include/lldb/Host/MainLoop.h
+++ lldb/include/lldb/Host/MainLoop.h
@@ -95,7 +95,7 @@
 
   struct SignalInfo {
 std::list callbacks;
-#if HAVE_SIGACTION
+#ifndef SIGNAL_POLLING_UNSUPPORTED
 struct sigaction old_action;
 #endif
 bool was_blocked : 1;
Index: lldb/include/lldb/Host/Config.h.cmake
===
--- lldb/include/lldb/Host/Config.h.cmake
+++ lldb/include/lldb/Host/Config.h.cmake
@@ -22,8 +22,6 @@
 
 #cmakedefine01 HAVE_PTSNAME_R
 
-#cmakedefine01 HAVE_SIGACTION
-
 #cmakedefine01 HAVE_PROCESS_VM_READV
 
 #cmakedefine01 HAVE_NR_PROCESS_VM_READV
Index: lldb/cmake/modules/LLDBGenerateConfig.cmake
===
--- lldb/cmake/modules/LLDBGenerateConfig.cmake
+++ lldb/cmake/modules/LLDBGenerateConfig.cmake
@@ -9,7 +9,6 @@
 check_symbol_exists(ppoll poll.h HAVE_PPOLL)
 check_symbol_exists(ptsname_r stdlib.h HAVE_PTSNAME_R)
 set(CMAKE_REQUIRED_DEFINITIONS)
-check_symbol_exists(sigaction signal.h HAVE_SIGACTION)
 check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
 
 check_include_file(termios.h HAVE_TERMIOS_H)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D107255: [lldb] Get rid of HAVE_SIGACTION

2021-08-02 Thread Nico Weber via Phabricator via lldb-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG82dc463bb356: [lldb] Get rid of HAVE_SIGACTION (authored by 
thakis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107255/new/

https://reviews.llvm.org/D107255

Files:
  lldb/cmake/modules/LLDBGenerateConfig.cmake
  lldb/include/lldb/Host/Config.h.cmake
  lldb/include/lldb/Host/MainLoop.h


Index: lldb/include/lldb/Host/MainLoop.h
===
--- lldb/include/lldb/Host/MainLoop.h
+++ lldb/include/lldb/Host/MainLoop.h
@@ -95,7 +95,7 @@
 
   struct SignalInfo {
 std::list callbacks;
-#if HAVE_SIGACTION
+#ifndef SIGNAL_POLLING_UNSUPPORTED
 struct sigaction old_action;
 #endif
 bool was_blocked : 1;
Index: lldb/include/lldb/Host/Config.h.cmake
===
--- lldb/include/lldb/Host/Config.h.cmake
+++ lldb/include/lldb/Host/Config.h.cmake
@@ -22,8 +22,6 @@
 
 #cmakedefine01 HAVE_PTSNAME_R
 
-#cmakedefine01 HAVE_SIGACTION
-
 #cmakedefine01 HAVE_PROCESS_VM_READV
 
 #cmakedefine01 HAVE_NR_PROCESS_VM_READV
Index: lldb/cmake/modules/LLDBGenerateConfig.cmake
===
--- lldb/cmake/modules/LLDBGenerateConfig.cmake
+++ lldb/cmake/modules/LLDBGenerateConfig.cmake
@@ -9,7 +9,6 @@
 check_symbol_exists(ppoll poll.h HAVE_PPOLL)
 check_symbol_exists(ptsname_r stdlib.h HAVE_PTSNAME_R)
 set(CMAKE_REQUIRED_DEFINITIONS)
-check_symbol_exists(sigaction signal.h HAVE_SIGACTION)
 check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
 
 check_include_file(termios.h HAVE_TERMIOS_H)


Index: lldb/include/lldb/Host/MainLoop.h
===
--- lldb/include/lldb/Host/MainLoop.h
+++ lldb/include/lldb/Host/MainLoop.h
@@ -95,7 +95,7 @@
 
   struct SignalInfo {
 std::list callbacks;
-#if HAVE_SIGACTION
+#ifndef SIGNAL_POLLING_UNSUPPORTED
 struct sigaction old_action;
 #endif
 bool was_blocked : 1;
Index: lldb/include/lldb/Host/Config.h.cmake
===
--- lldb/include/lldb/Host/Config.h.cmake
+++ lldb/include/lldb/Host/Config.h.cmake
@@ -22,8 +22,6 @@
 
 #cmakedefine01 HAVE_PTSNAME_R
 
-#cmakedefine01 HAVE_SIGACTION
-
 #cmakedefine01 HAVE_PROCESS_VM_READV
 
 #cmakedefine01 HAVE_NR_PROCESS_VM_READV
Index: lldb/cmake/modules/LLDBGenerateConfig.cmake
===
--- lldb/cmake/modules/LLDBGenerateConfig.cmake
+++ lldb/cmake/modules/LLDBGenerateConfig.cmake
@@ -9,7 +9,6 @@
 check_symbol_exists(ppoll poll.h HAVE_PPOLL)
 check_symbol_exists(ptsname_r stdlib.h HAVE_PTSNAME_R)
 set(CMAKE_REQUIRED_DEFINITIONS)
-check_symbol_exists(sigaction signal.h HAVE_SIGACTION)
 check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
 
 check_include_file(termios.h HAVE_TERMIOS_H)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D107338: [lldb] Get rid of HAVE_SYS_TYPES_H

2021-08-03 Thread Nico Weber via Phabricator via lldb-commits
thakis created this revision.
thakis added a reviewer: JDevlieghere.
thakis added a project: LLDB.
Herald added a subscriber: mgorny.
thakis requested review of this revision.

LLVM includes this header unconditionally on all platforms
(including Windows), so this define should no longer be necessary.

No behavior change.


https://reviews.llvm.org/D107338

Files:
  lldb/cmake/modules/LLDBGenerateConfig.cmake
  lldb/include/lldb/Host/Config.h.cmake
  lldb/include/lldb/Host/windows/PosixApi.h
  lldb/source/Expression/UserExpression.cpp
  lldb/source/Expression/UtilityFunction.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
  lldb/tools/driver/Platform.h

Index: lldb/tools/driver/Platform.h
===
--- lldb/tools/driver/Platform.h
+++ lldb/tools/driver/Platform.h
@@ -9,6 +9,8 @@
 #ifndef LLDB_TOOLS_DRIVER_PLATFORM_H
 #define LLDB_TOOLS_DRIVER_PLATFORM_H
 
+// FIXME: This include is now unused. Make sure all files that got it
+// via Platform.h that need it include it directly, then remove this.
 #include "lldb/Host/Config.h"
 
 #if defined(_WIN32)
@@ -17,11 +19,10 @@
 #if defined(_MSC_VER)
 #include 
 #endif
-#if HAVE_SYS_TYPES_H
-#include 
-#endif
+
 #include "lldb/Host/windows/windows.h"
 #include 
+#include 
 
 struct winsize {
   long ws_col;
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
===
--- lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
@@ -6,8 +6,6 @@
 //
 //===--===//
 
-#include "lldb/Host/Config.h"
-
 #include "ClangUtilityFunction.h"
 #include "ClangExpressionDeclMap.h"
 #include "ClangExpressionParser.h"
@@ -15,9 +13,7 @@
 #include "ClangPersistentVariables.h"
 
 #include 
-#if HAVE_SYS_TYPES_H
 #include 
-#endif
 
 
 #include "lldb/Core/Module.h"
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
===
--- lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
@@ -6,12 +6,8 @@
 //
 //===--===//
 
-#include "lldb/Host/Config.h"
-
 #include 
-#if HAVE_SYS_TYPES_H
 #include 
-#endif
 
 #include 
 #include 
Index: lldb/source/Expression/UtilityFunction.cpp
===
--- lldb/source/Expression/UtilityFunction.cpp
+++ lldb/source/Expression/UtilityFunction.cpp
@@ -6,13 +6,8 @@
 //
 //===--===//
 
-#include "lldb/Host/Config.h"
-
 #include 
-#if HAVE_SYS_TYPES_H
 #include 
-#endif
-
 
 #include "lldb/Core/Module.h"
 #include "lldb/Core/StreamFile.h"
Index: lldb/source/Expression/UserExpression.cpp
===
--- lldb/source/Expression/UserExpression.cpp
+++ lldb/source/Expression/UserExpression.cpp
@@ -6,12 +6,8 @@
 //
 //===--===//
 
-#include "lldb/Host/Config.h"
-
 #include 
-#if HAVE_SYS_TYPES_H
 #include 
-#endif
 
 #include 
 #include 
Index: lldb/include/lldb/Host/windows/PosixApi.h
===
--- lldb/include/lldb/Host/windows/PosixApi.h
+++ lldb/include/lldb/Host/windows/PosixApi.h
@@ -56,14 +56,12 @@
 #define S_IRWXO 0
 #endif
 
-#if HAVE_SYS_TYPES_H
 // pyconfig.h typedefs this.  We require python headers to be included before
 // any LLDB headers, but there's no way to prevent python's pid_t definition
 // from leaking, so this is the best option.
 #ifndef NO_PID_T
 #include 
 #endif
-#endif // HAVE_SYS_TYPES_H
 
 #ifdef _MSC_VER
 
Index: lldb/include/lldb/Host/Config.h.cmake
===
--- lldb/include/lldb/Host/Config.h.cmake
+++ lldb/include/lldb/Host/Config.h.cmake
@@ -13,9 +13,6 @@
 
 #cmakedefine01 LLDB_HAVE_EL_RFUNC_T
 
-
-#cmakedefine01 HAVE_SYS_TYPES_H
-
 #cmakedefine01 HAVE_SYS_EVENT_H
 
 #cmakedefine01 HAVE_PPOLL
Index: lldb/cmake/modules/LLDBGenerateConfig.cmake
===
--- lldb/cmake/modules/LLDBGenerateConfig.cmake
+++ lldb/cmake/modules/LLDBGenerateConfig.cmake
@@ -12,7 +12,6 @@
 check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
 
 check_include_file(termios.h HAVE_TERMIOS_H)
-check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
 check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
 
 check_cxx_symbol_exists(process_vm_readv "sys/uio.h" HAVE_PROCESS_VM_READV)
_

[Lldb-commits] [PATCH] D107338: [lldb] Get rid of HAVE_SYS_TYPES_H

2021-08-03 Thread Nico Weber via Phabricator via lldb-commits
thakis updated this revision to Diff 363685.
thakis added a comment.

Remove Config.h include from driver/Platform.h. Platform.h only gets included 
in 5 files, and I checked that none of those need Config.h.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107338/new/

https://reviews.llvm.org/D107338

Files:
  lldb/cmake/modules/LLDBGenerateConfig.cmake
  lldb/include/lldb/Host/Config.h.cmake
  lldb/include/lldb/Host/windows/PosixApi.h
  lldb/source/Expression/UserExpression.cpp
  lldb/source/Expression/UtilityFunction.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
  lldb/tools/driver/Platform.h

Index: lldb/tools/driver/Platform.h
===
--- lldb/tools/driver/Platform.h
+++ lldb/tools/driver/Platform.h
@@ -9,19 +9,16 @@
 #ifndef LLDB_TOOLS_DRIVER_PLATFORM_H
 #define LLDB_TOOLS_DRIVER_PLATFORM_H
 
-#include "lldb/Host/Config.h"
-
 #if defined(_WIN32)
 
 #include 
 #if defined(_MSC_VER)
 #include 
 #endif
-#if HAVE_SYS_TYPES_H
-#include 
-#endif
+
 #include "lldb/Host/windows/windows.h"
 #include 
+#include 
 
 struct winsize {
   long ws_col;
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
===
--- lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
@@ -6,8 +6,6 @@
 //
 //===--===//
 
-#include "lldb/Host/Config.h"
-
 #include "ClangUtilityFunction.h"
 #include "ClangExpressionDeclMap.h"
 #include "ClangExpressionParser.h"
@@ -15,9 +13,7 @@
 #include "ClangPersistentVariables.h"
 
 #include 
-#if HAVE_SYS_TYPES_H
 #include 
-#endif
 
 
 #include "lldb/Core/Module.h"
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
===
--- lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
@@ -6,12 +6,8 @@
 //
 //===--===//
 
-#include "lldb/Host/Config.h"
-
 #include 
-#if HAVE_SYS_TYPES_H
 #include 
-#endif
 
 #include 
 #include 
Index: lldb/source/Expression/UtilityFunction.cpp
===
--- lldb/source/Expression/UtilityFunction.cpp
+++ lldb/source/Expression/UtilityFunction.cpp
@@ -6,13 +6,8 @@
 //
 //===--===//
 
-#include "lldb/Host/Config.h"
-
 #include 
-#if HAVE_SYS_TYPES_H
 #include 
-#endif
-
 
 #include "lldb/Core/Module.h"
 #include "lldb/Core/StreamFile.h"
Index: lldb/source/Expression/UserExpression.cpp
===
--- lldb/source/Expression/UserExpression.cpp
+++ lldb/source/Expression/UserExpression.cpp
@@ -6,12 +6,8 @@
 //
 //===--===//
 
-#include "lldb/Host/Config.h"
-
 #include 
-#if HAVE_SYS_TYPES_H
 #include 
-#endif
 
 #include 
 #include 
Index: lldb/include/lldb/Host/windows/PosixApi.h
===
--- lldb/include/lldb/Host/windows/PosixApi.h
+++ lldb/include/lldb/Host/windows/PosixApi.h
@@ -56,14 +56,12 @@
 #define S_IRWXO 0
 #endif
 
-#if HAVE_SYS_TYPES_H
 // pyconfig.h typedefs this.  We require python headers to be included before
 // any LLDB headers, but there's no way to prevent python's pid_t definition
 // from leaking, so this is the best option.
 #ifndef NO_PID_T
 #include 
 #endif
-#endif // HAVE_SYS_TYPES_H
 
 #ifdef _MSC_VER
 
Index: lldb/include/lldb/Host/Config.h.cmake
===
--- lldb/include/lldb/Host/Config.h.cmake
+++ lldb/include/lldb/Host/Config.h.cmake
@@ -13,9 +13,6 @@
 
 #cmakedefine01 LLDB_HAVE_EL_RFUNC_T
 
-
-#cmakedefine01 HAVE_SYS_TYPES_H
-
 #cmakedefine01 HAVE_SYS_EVENT_H
 
 #cmakedefine01 HAVE_PPOLL
Index: lldb/cmake/modules/LLDBGenerateConfig.cmake
===
--- lldb/cmake/modules/LLDBGenerateConfig.cmake
+++ lldb/cmake/modules/LLDBGenerateConfig.cmake
@@ -12,7 +12,6 @@
 check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
 
 check_include_file(termios.h HAVE_TERMIOS_H)
-check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
 check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
 
 check_cxx_symbol_exists(process_vm_readv "sys/uio.h" HAVE_PROCESS_VM_READV)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D107338: [lldb] Get rid of HAVE_SYS_TYPES_H

2021-08-03 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

In LLVM, this was removed in 37f69de11b8c1810e29851430da317db5c1350a9.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107338/new/

https://reviews.llvm.org/D107338

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D107341: [lldb] Move comment about noindex next to line it refers to

2021-08-03 Thread Nico Weber via Phabricator via lldb-commits
thakis created this revision.
thakis added a reviewer: JDevlieghere.
thakis added a project: LLDB.
Herald added subscribers: arphaman, mgorny.
thakis requested review of this revision.

The comment was originally added in 34769d80d. Then D44526 

removed the flag added there (but kept the comment), and then
D66966  reintroduced a .noindex dir (which 
D68606  and then 33fca97880
moved around a bit).

No behavior change.


https://reviews.llvm.org/D107341

Files:
  lldb/test/API/CMakeLists.txt
  lldb/test/CMakeLists.txt


Index: lldb/test/CMakeLists.txt
===
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -12,6 +12,11 @@
 endif()
 
 # Configure the build directory.
+# The .noindex suffix is a marker for Spotlight to never index the
+# build directory.  LLDB queries Spotlight to locate .dSYM bundles
+# based on the UUID embedded in a binary, and because the UUID is a
+# hash of filename and .text section, there *will* be conflicts inside
+# the build directory.
 set(LLDB_TEST_BUILD_DIRECTORY "${PROJECT_BINARY_DIR}/lldb-test-build.noindex" 
CACHE PATH "The build root for building tests.")
 
 # Configure and create module cache directories.
Index: lldb/test/API/CMakeLists.txt
===
--- lldb/test/API/CMakeLists.txt
+++ lldb/test/API/CMakeLists.txt
@@ -37,11 +37,6 @@
   ""
   CACHE STRING "Specify additional arguments to pass to test runner. For 
example: '-C gcc -C clang -A i386 -A x86_64'")
 
-# The .noindex suffix is a marker for Spotlight to never index the
-# build directory.  LLDB queries Spotlight to locate .dSYM bundles
-# based on the UUID embedded in a binary, and because the UUID is a
-# hash of filename and .text section, there *will* be conflicts inside
-# the build directory.
 set(LLDB_TEST_COMMON_ARGS
   -u CXXFLAGS
   -u CFLAGS


Index: lldb/test/CMakeLists.txt
===
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -12,6 +12,11 @@
 endif()
 
 # Configure the build directory.
+# The .noindex suffix is a marker for Spotlight to never index the
+# build directory.  LLDB queries Spotlight to locate .dSYM bundles
+# based on the UUID embedded in a binary, and because the UUID is a
+# hash of filename and .text section, there *will* be conflicts inside
+# the build directory.
 set(LLDB_TEST_BUILD_DIRECTORY "${PROJECT_BINARY_DIR}/lldb-test-build.noindex" CACHE PATH "The build root for building tests.")
 
 # Configure and create module cache directories.
Index: lldb/test/API/CMakeLists.txt
===
--- lldb/test/API/CMakeLists.txt
+++ lldb/test/API/CMakeLists.txt
@@ -37,11 +37,6 @@
   ""
   CACHE STRING "Specify additional arguments to pass to test runner. For example: '-C gcc -C clang -A i386 -A x86_64'")
 
-# The .noindex suffix is a marker for Spotlight to never index the
-# build directory.  LLDB queries Spotlight to locate .dSYM bundles
-# based on the UUID embedded in a binary, and because the UUID is a
-# hash of filename and .text section, there *will* be conflicts inside
-# the build directory.
 set(LLDB_TEST_COMMON_ARGS
   -u CXXFLAGS
   -u CFLAGS
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D107341: [lldb] Move comment about noindex next to line it refers to

2021-08-03 Thread Nico Weber via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4367cbab4cf2: [lldb] Move comment about noindex next to line 
it refers to (authored by thakis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107341/new/

https://reviews.llvm.org/D107341

Files:
  lldb/test/API/CMakeLists.txt
  lldb/test/CMakeLists.txt


Index: lldb/test/CMakeLists.txt
===
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -12,6 +12,11 @@
 endif()
 
 # Configure the build directory.
+# The .noindex suffix is a marker for Spotlight to never index the
+# build directory.  LLDB queries Spotlight to locate .dSYM bundles
+# based on the UUID embedded in a binary, and because the UUID is a
+# hash of filename and .text section, there *will* be conflicts inside
+# the build directory.
 set(LLDB_TEST_BUILD_DIRECTORY "${PROJECT_BINARY_DIR}/lldb-test-build.noindex" 
CACHE PATH "The build root for building tests.")
 
 # Configure and create module cache directories.
Index: lldb/test/API/CMakeLists.txt
===
--- lldb/test/API/CMakeLists.txt
+++ lldb/test/API/CMakeLists.txt
@@ -37,11 +37,6 @@
   ""
   CACHE STRING "Specify additional arguments to pass to test runner. For 
example: '-C gcc -C clang -A i386 -A x86_64'")
 
-# The .noindex suffix is a marker for Spotlight to never index the
-# build directory.  LLDB queries Spotlight to locate .dSYM bundles
-# based on the UUID embedded in a binary, and because the UUID is a
-# hash of filename and .text section, there *will* be conflicts inside
-# the build directory.
 set(LLDB_TEST_COMMON_ARGS
   -u CXXFLAGS
   -u CFLAGS


Index: lldb/test/CMakeLists.txt
===
--- lldb/test/CMakeLists.txt
+++ lldb/test/CMakeLists.txt
@@ -12,6 +12,11 @@
 endif()
 
 # Configure the build directory.
+# The .noindex suffix is a marker for Spotlight to never index the
+# build directory.  LLDB queries Spotlight to locate .dSYM bundles
+# based on the UUID embedded in a binary, and because the UUID is a
+# hash of filename and .text section, there *will* be conflicts inside
+# the build directory.
 set(LLDB_TEST_BUILD_DIRECTORY "${PROJECT_BINARY_DIR}/lldb-test-build.noindex" CACHE PATH "The build root for building tests.")
 
 # Configure and create module cache directories.
Index: lldb/test/API/CMakeLists.txt
===
--- lldb/test/API/CMakeLists.txt
+++ lldb/test/API/CMakeLists.txt
@@ -37,11 +37,6 @@
   ""
   CACHE STRING "Specify additional arguments to pass to test runner. For example: '-C gcc -C clang -A i386 -A x86_64'")
 
-# The .noindex suffix is a marker for Spotlight to never index the
-# build directory.  LLDB queries Spotlight to locate .dSYM bundles
-# based on the UUID embedded in a binary, and because the UUID is a
-# hash of filename and .text section, there *will* be conflicts inside
-# the build directory.
 set(LLDB_TEST_COMMON_ARGS
   -u CXXFLAGS
   -u CFLAGS
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D107338: [lldb] Get rid of HAVE_SYS_TYPES_H

2021-08-03 Thread Nico Weber via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGbf3383501fef: [lldb] Get rid of HAVE_SYS_TYPES_H (authored 
by thakis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107338/new/

https://reviews.llvm.org/D107338

Files:
  lldb/cmake/modules/LLDBGenerateConfig.cmake
  lldb/include/lldb/Host/Config.h.cmake
  lldb/include/lldb/Host/windows/PosixApi.h
  lldb/source/Expression/UserExpression.cpp
  lldb/source/Expression/UtilityFunction.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
  lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
  lldb/tools/driver/Platform.h

Index: lldb/tools/driver/Platform.h
===
--- lldb/tools/driver/Platform.h
+++ lldb/tools/driver/Platform.h
@@ -9,19 +9,16 @@
 #ifndef LLDB_TOOLS_DRIVER_PLATFORM_H
 #define LLDB_TOOLS_DRIVER_PLATFORM_H
 
-#include "lldb/Host/Config.h"
-
 #if defined(_WIN32)
 
 #include 
 #if defined(_MSC_VER)
 #include 
 #endif
-#if HAVE_SYS_TYPES_H
-#include 
-#endif
+
 #include "lldb/Host/windows/windows.h"
 #include 
+#include 
 
 struct winsize {
   long ws_col;
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
===
--- lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
@@ -6,8 +6,6 @@
 //
 //===--===//
 
-#include "lldb/Host/Config.h"
-
 #include "ClangUtilityFunction.h"
 #include "ClangExpressionDeclMap.h"
 #include "ClangExpressionParser.h"
@@ -15,9 +13,7 @@
 #include "ClangPersistentVariables.h"
 
 #include 
-#if HAVE_SYS_TYPES_H
 #include 
-#endif
 
 
 #include "lldb/Core/Module.h"
Index: lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
===
--- lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
+++ lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
@@ -6,12 +6,8 @@
 //
 //===--===//
 
-#include "lldb/Host/Config.h"
-
 #include 
-#if HAVE_SYS_TYPES_H
 #include 
-#endif
 
 #include 
 #include 
Index: lldb/source/Expression/UtilityFunction.cpp
===
--- lldb/source/Expression/UtilityFunction.cpp
+++ lldb/source/Expression/UtilityFunction.cpp
@@ -6,13 +6,8 @@
 //
 //===--===//
 
-#include "lldb/Host/Config.h"
-
 #include 
-#if HAVE_SYS_TYPES_H
 #include 
-#endif
-
 
 #include "lldb/Core/Module.h"
 #include "lldb/Core/StreamFile.h"
Index: lldb/source/Expression/UserExpression.cpp
===
--- lldb/source/Expression/UserExpression.cpp
+++ lldb/source/Expression/UserExpression.cpp
@@ -6,12 +6,8 @@
 //
 //===--===//
 
-#include "lldb/Host/Config.h"
-
 #include 
-#if HAVE_SYS_TYPES_H
 #include 
-#endif
 
 #include 
 #include 
Index: lldb/include/lldb/Host/windows/PosixApi.h
===
--- lldb/include/lldb/Host/windows/PosixApi.h
+++ lldb/include/lldb/Host/windows/PosixApi.h
@@ -56,14 +56,12 @@
 #define S_IRWXO 0
 #endif
 
-#if HAVE_SYS_TYPES_H
 // pyconfig.h typedefs this.  We require python headers to be included before
 // any LLDB headers, but there's no way to prevent python's pid_t definition
 // from leaking, so this is the best option.
 #ifndef NO_PID_T
 #include 
 #endif
-#endif // HAVE_SYS_TYPES_H
 
 #ifdef _MSC_VER
 
Index: lldb/include/lldb/Host/Config.h.cmake
===
--- lldb/include/lldb/Host/Config.h.cmake
+++ lldb/include/lldb/Host/Config.h.cmake
@@ -13,9 +13,6 @@
 
 #cmakedefine01 LLDB_HAVE_EL_RFUNC_T
 
-
-#cmakedefine01 HAVE_SYS_TYPES_H
-
 #cmakedefine01 HAVE_SYS_EVENT_H
 
 #cmakedefine01 HAVE_PPOLL
Index: lldb/cmake/modules/LLDBGenerateConfig.cmake
===
--- lldb/cmake/modules/LLDBGenerateConfig.cmake
+++ lldb/cmake/modules/LLDBGenerateConfig.cmake
@@ -12,7 +12,6 @@
 check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
 
 check_include_file(termios.h HAVE_TERMIOS_H)
-check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
 check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
 
 check_cxx_symbol_exists(process_vm_readv "sys/uio.h" HAVE_PROCESS_VM_READV)
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D107444: [lldb] Remove a few unused .exports files

2021-08-04 Thread Nico Weber via Phabricator via lldb-commits
thakis created this revision.
thakis added reviewers: teemperor, JDevlieghere.
thakis added a project: LLDB.
thakis requested review of this revision.

They used to be referenced from the .xcodeproj files, but those are long gone.

No behavior change.


https://reviews.llvm.org/D107444

Files:
  lldb/source/API/liblldb.xcode.exports
  lldb/tools/argdumper/argdumper.exports
  lldb/tools/lldb-server/lldb-server.exports


Index: lldb/source/API/liblldb.xcode.exports
===
--- lldb/source/API/liblldb.xcode.exports
+++ /dev/null
@@ -1,3 +0,0 @@
-__ZN4lldb*
-__ZNK4lldb*
-_init_lld*


Index: lldb/source/API/liblldb.xcode.exports
===
--- lldb/source/API/liblldb.xcode.exports
+++ /dev/null
@@ -1,3 +0,0 @@
-__ZN4lldb*
-__ZNK4lldb*
-_init_lld*
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D107446: [lldb] Stop referencing "host_lib" in cmake files

2021-08-04 Thread Nico Weber via Phabricator via lldb-commits
thakis created this revision.
thakis added reviewers: teemperor, JDevlieghere.
thakis added a project: LLDB.
Herald added a subscriber: mgorny.
thakis requested review of this revision.

lldb/tools/driver/CMakeLists.txt used to set host_lib to something until
https://reviews.llvm.org/rG7b968969db and I think CMake file processing
order means this used to be set to something in these two files here too, but
since 2.5 years ago this always expanded to nothing here. So just remove it.

No behavior change.


https://reviews.llvm.org/D107446

Files:
  lldb/tools/lldb-test/CMakeLists.txt
  lldb/tools/lldb-vscode/CMakeLists.txt


Index: lldb/tools/lldb-vscode/CMakeLists.txt
===
--- lldb/tools/lldb-vscode/CMakeLists.txt
+++ lldb/tools/lldb-vscode/CMakeLists.txt
@@ -40,7 +40,6 @@
 
   LINK_LIBS
 liblldb
-${host_lib}
 ${extra_libs}
 
   LINK_COMPONENTS
Index: lldb/tools/lldb-test/CMakeLists.txt
===
--- lldb/tools/lldb-test/CMakeLists.txt
+++ lldb/tools/lldb-test/CMakeLists.txt
@@ -18,7 +18,6 @@
 lldbTarget
 lldbUtility
 ${LLDB_ALL_PLUGINS}
-${host_lib}
 
   LINK_COMPONENTS
 Support


Index: lldb/tools/lldb-vscode/CMakeLists.txt
===
--- lldb/tools/lldb-vscode/CMakeLists.txt
+++ lldb/tools/lldb-vscode/CMakeLists.txt
@@ -40,7 +40,6 @@
 
   LINK_LIBS
 liblldb
-${host_lib}
 ${extra_libs}
 
   LINK_COMPONENTS
Index: lldb/tools/lldb-test/CMakeLists.txt
===
--- lldb/tools/lldb-test/CMakeLists.txt
+++ lldb/tools/lldb-test/CMakeLists.txt
@@ -18,7 +18,6 @@
 lldbTarget
 lldbUtility
 ${LLDB_ALL_PLUGINS}
-${host_lib}
 
   LINK_COMPONENTS
 Support
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D107444: [lldb] Remove a few unused .exports files

2021-08-05 Thread Nico Weber via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG11565320fd55: [lldb] Remove a few unused .exports files 
(authored by thakis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107444/new/

https://reviews.llvm.org/D107444

Files:
  lldb/source/API/liblldb.xcode.exports
  lldb/tools/argdumper/argdumper.exports
  lldb/tools/lldb-server/lldb-server.exports


Index: lldb/source/API/liblldb.xcode.exports
===
--- lldb/source/API/liblldb.xcode.exports
+++ /dev/null
@@ -1,3 +0,0 @@
-__ZN4lldb*
-__ZNK4lldb*
-_init_lld*


Index: lldb/source/API/liblldb.xcode.exports
===
--- lldb/source/API/liblldb.xcode.exports
+++ /dev/null
@@ -1,3 +0,0 @@
-__ZN4lldb*
-__ZNK4lldb*
-_init_lld*
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D107446: [lldb] Stop referencing "host_lib" in cmake files

2021-08-05 Thread Nico Weber via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe71fdc1acf05: [lldb] Stop referencing "host_lib" 
in cmake files (authored by thakis).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107446/new/

https://reviews.llvm.org/D107446

Files:
  lldb/tools/lldb-test/CMakeLists.txt
  lldb/tools/lldb-vscode/CMakeLists.txt


Index: lldb/tools/lldb-vscode/CMakeLists.txt
===
--- lldb/tools/lldb-vscode/CMakeLists.txt
+++ lldb/tools/lldb-vscode/CMakeLists.txt
@@ -40,7 +40,6 @@
 
   LINK_LIBS
 liblldb
-${host_lib}
 ${extra_libs}
 
   LINK_COMPONENTS
Index: lldb/tools/lldb-test/CMakeLists.txt
===
--- lldb/tools/lldb-test/CMakeLists.txt
+++ lldb/tools/lldb-test/CMakeLists.txt
@@ -18,7 +18,6 @@
 lldbTarget
 lldbUtility
 ${LLDB_ALL_PLUGINS}
-${host_lib}
 
   LINK_COMPONENTS
 Support


Index: lldb/tools/lldb-vscode/CMakeLists.txt
===
--- lldb/tools/lldb-vscode/CMakeLists.txt
+++ lldb/tools/lldb-vscode/CMakeLists.txt
@@ -40,7 +40,6 @@
 
   LINK_LIBS
 liblldb
-${host_lib}
 ${extra_libs}
 
   LINK_COMPONENTS
Index: lldb/tools/lldb-test/CMakeLists.txt
===
--- lldb/tools/lldb-test/CMakeLists.txt
+++ lldb/tools/lldb-test/CMakeLists.txt
@@ -18,7 +18,6 @@
 lldbTarget
 lldbUtility
 ${LLDB_ALL_PLUGINS}
-${host_lib}
 
   LINK_COMPONENTS
 Support
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D100503: [lldb] [client] Implement follow-fork-mode

2021-09-02 Thread Nico Weber via Phabricator via lldb-commits
thakis added a comment.

The new tests here fall for me on macOS:

  [4303/4304] Running lldb shell test suite
  llvm-lit: 
/Users/thakis/src/llvm-project/lldb/test/Shell/helper/toolchain.py:126: note: 
using SDKROOT: '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk'
  llvm-lit: 
/Users/thakis/src/llvm-project/llvm/utils/lit/lit/llvm/config.py:436: note: 
using clang: /Users/thakis/src/llvm-build-project/bin/clang
  llvm-lit: 
/Users/thakis/src/llvm-project/llvm/utils/lit/lit/llvm/config.py:436: note: 
using ld.lld: /Users/thakis/src/llvm-build-project/bin/ld.lld
  llvm-lit: 
/Users/thakis/src/llvm-project/llvm/utils/lit/lit/llvm/config.py:436: note: 
using lld-link: /Users/thakis/src/llvm-build-project/bin/lld-link
  llvm-lit: 
/Users/thakis/src/llvm-project/llvm/utils/lit/lit/llvm/config.py:436: note: 
using ld64.lld: /Users/thakis/src/llvm-build-project/bin/ld64.lld
  llvm-lit: 
/Users/thakis/src/llvm-project/llvm/utils/lit/lit/llvm/config.py:436: note: 
using wasm-ld: /Users/thakis/src/llvm-build-project/bin/wasm-ld
  llvm-lit: /Users/thakis/src/llvm-project/lldb/test/Shell/lit.cfg.py:98: 
warning: Could not set a default per-test timeout. Requires the Python psutil 
module but it could not be found. Try installing it via pip or via your 
operating system's package manager.
  FAIL: lldb-shell :: Subprocess/fork-follow-child.test (433 of 437)
   TEST 'lldb-shell :: Subprocess/fork-follow-child.test' 
FAILED 
  Script:
  --
  : 'RUN: at line 3';   /Users/thakis/src/llvm-build-project/bin/clang 
--driver-mode=g++ --target=specify-a-target-or-use-a-_host-substitution 
--target=x86_64-apple-darwin19.6.0 -isysroot 
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk 
-fmodules-cache-path=/Users/thakis/src/llvm-build-project/lldb-test-build.noindex/module-cache-clang/lldb-shell
 /Users/thakis/src/llvm-project/lldb/test/Shell/Subprocess/Inputs/fork.cpp 
-DTEST_FORK=fork -o 
/Users/thakis/src/llvm-build-project/tools/lldb/test/Shell/Subprocess/Output/fork-follow-child.test.tmp
  : 'RUN: at line 4';   /Users/thakis/src/llvm-build-project/bin/lldb 
--no-lldbinit -S 
/Users/thakis/src/llvm-build-project/tools/lldb/test/Shell/lit-lldb-init -b -s 
/Users/thakis/src/llvm-project/lldb/test/Shell/Subprocess/fork-follow-child.test
 
/Users/thakis/src/llvm-build-project/tools/lldb/test/Shell/Subprocess/Output/fork-follow-child.test.tmp
 | /Users/thakis/src/llvm-build-project/bin/FileCheck 
/Users/thakis/src/llvm-project/lldb/test/Shell/Subprocess/fork-follow-child.test
  --
  Exit Code: 1
  
  Command Output (stderr):
  --
  clang-13: warning: argument unused during compilation: 
'-fmodules-cache-path=/Users/thakis/src/llvm-build-project/lldb-test-build.noindex/module-cache-clang/lldb-shell'
 [-Wunused-command-line-argument]
  
/Users/thakis/src/llvm-project/lldb/test/Shell/Subprocess/fork-follow-child.test:9:10:
 error: CHECK: expected string not found in input
  # CHECK: child exited: 0
   ^
  :26:69: note: scanning from here
   0x13cee <+14>: leaq 0x21b(%rip), %rdi ; "function run in parent\n"
  ^
  :27:115: note: possible intended match here
  Process 39485 launched: 
'/Users/thakis/src/llvm-build-project/tools/lldb/test/Shell/Subprocess/Output/fork-follow-child.test.tmp'
 (x86_64)

^
  
  Input file: 
  Check file: 
/Users/thakis/src/llvm-project/lldb/test/Shell/Subprocess/fork-follow-child.test
  
  -dump-input=help explains the following input dump.
  
  Input was:
  <<
 .
 .
 .
21:  frame #0: 0x00013ce0 
fork-follow-child.test.tmp`parent_func()
22: fork-follow-child.test.tmp`parent_func:
23: -> 0x13ce0 <+0>: pushq %rbp
24:  0x13ce1 <+1>: movq %rsp, %rbp
25:  0x13ce4 <+4>: movl $0x1, 0x434a(%rip) ; _dyld_private + 4
26:  0x13cee <+14>: leaq 0x21b(%rip), %rdi ; "function run in 
parent\n"
  check:9'0 
X~~~ error: no match found
27: Process 39485 launched: 
'/Users/thakis/src/llvm-build-project/tools/lldb/test/Shell/Subprocess/Output/fork-follow-child.test.tmp'
 (x86_64)
  check:9'0 
~~~
  check:9'1 
  ? 
possible intended match
  >>
  
  --
  
  
  FAIL: lldb-shell :: Subprocess/vfork-follow-child.test (434 of 437)
   TEST 'lldb-shell :: Subprocess/vfork-follow-child.test' 
FAILED 
  Script:
  --
  : 'RUN: at line 3'

  1   2   >