[Lldb-commits] [PATCH] D135827: [lldb] Print newline between found types

2022-10-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett accepted this revision.
DavidSpickett added a comment.
This revision is now accepted and ready to land.

LGTM.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135827

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


[Lldb-commits] [PATCH] D136011: [lldb] Don't check environment default char signedness when creating clang type for "char"

2022-10-17 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett added a comment.

> With -f(un)signed-char, the die corresponding to "char" may be the wrong 
> DW_ATE_(un)signed_char.

As the producer of the DWARF (so, clang for example) is this correct by the 
existing rules?

As I understand it so far, if the compiler is using "char" (no sign chosen) it 
can use either `DW_ATE_unsigned_char` or `DW_ATE_signed_char`. So lldb cannot 
trust the choice the compiler made to tell it what plain `char` signedness 
should be?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136011

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


[Lldb-commits] [lldb] 66763b2 - Revert "[lldb] Use std::underlying_type_t (NFC)"

2022-10-17 Thread David Spickett via lldb-commits

Author: David Spickett
Date: 2022-10-17T10:55:19Z
New Revision: 66763b287007ac4a2fd19b8db2bdd8b52d503666

URL: 
https://github.com/llvm/llvm-project/commit/66763b287007ac4a2fd19b8db2bdd8b52d503666
DIFF: 
https://github.com/llvm/llvm-project/commit/66763b287007ac4a2fd19b8db2bdd8b52d503666.diff

LOG: Revert "[lldb] Use std::underlying_type_t (NFC)"

This reverts commit 921a4d5be4bbe3c337419dfcc313b3eb892c2870.

Due to buildbot failures on Arm and Arm64.

https://lab.llvm.org/buildbot/#/builders/96/builds/30231

Added: 


Modified: 
lldb/include/lldb/lldb-enumerations.h
lldb/source/Breakpoint/BreakpointResolverName.cpp

Removed: 




diff  --git a/lldb/include/lldb/lldb-enumerations.h 
b/lldb/include/lldb/lldb-enumerations.h
index 9f1183a06b536..2ac1a74214b42 100644
--- a/lldb/include/lldb/lldb-enumerations.h
+++ b/lldb/include/lldb/lldb-enumerations.h
@@ -20,15 +20,18 @@
 // this entire block, as it is not necessary for swig processing.
 #define LLDB_MARK_AS_BITMASK_ENUM(Enum)
\
   constexpr Enum operator|(Enum a, Enum b) {   
\
-return static_cast(static_cast>(a) |
\
- static_cast>(b));
\
+return static_cast(  
\
+static_cast::type>(a) | 
\
+static_cast::type>(b)); 
\
   }
\
   constexpr Enum operator&(Enum a, Enum b) {   
\
-return static_cast(static_cast>(a) &
\
- static_cast>(b));
\
+return static_cast(  
\
+static_cast::type>(a) & 
\
+static_cast::type>(b)); 
\
   }
\
   constexpr Enum operator~(Enum a) {   
\
-return static_cast(~static_cast>(a));   
\
+return static_cast(  
\
+~static_cast::type>(a));
\
   }
\
   inline Enum &operator|=(Enum &a, Enum b) {   
\
 a = a | b; 
\

diff  --git a/lldb/source/Breakpoint/BreakpointResolverName.cpp 
b/lldb/source/Breakpoint/BreakpointResolverName.cpp
index 5f42a96cd8c2e..dbaeec9c9afb9 100644
--- a/lldb/source/Breakpoint/BreakpointResolverName.cpp
+++ b/lldb/source/Breakpoint/BreakpointResolverName.cpp
@@ -164,7 +164,7 @@ BreakpointResolver 
*BreakpointResolverName::CreateFromStructuredData(
 error.SetErrorString("BRN::CFSD: name entry is not a string.");
 return nullptr;
   }
-  std::underlying_type_t fnt;
+  std::underlying_type::type fnt;
   success = names_mask_array->GetItemAtIndexAsInteger(i, fnt);
   if (!success) {
 error.SetErrorString("BRN::CFSD: name mask entry is not an integer.");



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


[Lldb-commits] [PATCH] D136011: [lldb] Don't check environment default char signedness when creating clang type for "char"

2022-10-17 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

In D136011#3860637 , @dblaikie wrote:

> I think the place where this will go wrong is in terms of how lldb renders 
> `char` values on non-default-char-signedness programs (it'll render them as 
> the default-char-signedness, which might be confusing to a user - since 
> they'll be looking at literals, etc, that are the other signedness) and how 
> lldb will interpret char literals (though that'll already be wrong - since 
> the literals are already being parsed with the default-char-signedness, I 
> think).

Yes, I'm pretty sure that will happen. OTOH, I don't think there's any value to 
fix this in a completely satisfactory way. Like, if the whole program was 
consistently with the non-default signedness, we could try to detect it and 
then configure the internal AST defaults accordingly. But that's hard to 
detect, and I'd be surprised if most programs are completely homogeneous like 
this.

So, overall, I quite like this fix.

> I'm curious why there were all those expected failures re: PR23069. Were they 
> not using the default char signedness? Or is the test using explicit 
> signedness, and so whatever platforms happen not to have the explicit value 
> sa their default are/were failing?

Yes, I'm pretty sure that's the case.

In D136011#3861792 , @DavidSpickett 
wrote:

>> With -f(un)signed-char, the die corresponding to "char" may be the wrong 
>> DW_ATE_(un)signed_char.
>
> As the producer of the DWARF (so, clang for example) is this correct by the 
> existing rules?

Yes, because DWARF never expected people will be round-tripping the debug info 
back into C(++). As far as it is concerned, it has correctly given you the 
signedness of the type.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136011

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


[Lldb-commits] [PATCH] D135516: [lldb] [MainLoopPosix] Fix crash upon adding lots of pending callbacks

2022-10-17 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.



Comment at: lldb/source/Host/posix/MainLoopPosix.cpp:399-402
+  if (m_triggering)
+return;
+  m_triggering = true;
+

Maybe something like `if (m_triggering.exchange(true)) return;` ?
This version should work as well, but it may save someone from wondering what 
will happen if two threads execute this concurrently.


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

https://reviews.llvm.org/D135516

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


[Lldb-commits] [PATCH] D135516: [lldb] [MainLoopPosix] Fix crash upon adding lots of pending callbacks

2022-10-17 Thread Michał Górny via Phabricator via lldb-commits
mgorny marked an inline comment as done.
mgorny added a comment.

Thanks. I'll do a fresh test run on the updated version and push if it passes.




Comment at: lldb/source/Host/posix/MainLoopPosix.cpp:399-402
+  if (m_triggering)
+return;
+  m_triggering = true;
+

labath wrote:
> Maybe something like `if (m_triggering.exchange(true)) return;` ?
> This version should work as well, but it may save someone from wondering what 
> will happen if two threads execute this concurrently.
Sure, I'll try that.


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

https://reviews.llvm.org/D135516

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


[Lldb-commits] [lldb] e8ee0f1 - [lldb] [MainLoopPosix] Fix crash upon adding lots of pending callbacks

2022-10-17 Thread Michał Górny via lldb-commits

Author: Michał Górny
Date: 2022-10-17T17:48:44+02:00
New Revision: e8ee0f121dbc2dc20a9de326531c4d4d061a20d8

URL: 
https://github.com/llvm/llvm-project/commit/e8ee0f121dbc2dc20a9de326531c4d4d061a20d8
DIFF: 
https://github.com/llvm/llvm-project/commit/e8ee0f121dbc2dc20a9de326531c4d4d061a20d8.diff

LOG: [lldb] [MainLoopPosix] Fix crash upon adding lots of pending callbacks

If lots of pending callbacks are added while the main loop has exited
already, the trigger pipe buffer fills in, causing the write to fail
and the related assertion to fail.  To avoid this, add a boolean member
indicating whether the callbacks have been triggered already.
If the trigger was done, avoid writing to the pipe until loops proceeds
to run them and resets the variable.

Besides fixing the issue, this also avoids writing to the pipe multiple
times if callbacks are added faster than the loop is able to process
them.  Previously, this would lead to the loop performing multiple read
iterations from pipe unnecessarily.

Sponsored by: The FreeBSD Foundation

Differential Revision: https://reviews.llvm.org/D135516

Added: 


Modified: 
lldb/include/lldb/Host/posix/MainLoopPosix.h
lldb/source/Host/posix/MainLoopPosix.cpp
lldb/unittests/Host/MainLoopTest.cpp

Removed: 




diff  --git a/lldb/include/lldb/Host/posix/MainLoopPosix.h 
b/lldb/include/lldb/Host/posix/MainLoopPosix.h
index 18185c3c5ee78..07497b7b8c259 100644
--- a/lldb/include/lldb/Host/posix/MainLoopPosix.h
+++ b/lldb/include/lldb/Host/posix/MainLoopPosix.h
@@ -13,6 +13,7 @@
 #include "lldb/Host/MainLoopBase.h"
 #include "lldb/Host/Pipe.h"
 #include "llvm/ADT/DenseMap.h"
+#include 
 #include 
 #include 
 #include 
@@ -87,6 +88,7 @@ class MainLoopPosix : public MainLoopBase {
   llvm::DenseMap m_read_fds;
   llvm::DenseMap m_signals;
   Pipe m_trigger_pipe;
+  std::atomic m_triggering;
 #if HAVE_SYS_EVENT_H
   int m_kqueue;
 #endif

diff  --git a/lldb/source/Host/posix/MainLoopPosix.cpp 
b/lldb/source/Host/posix/MainLoopPosix.cpp
index 37d339d8bc779..b185c3d3b7076 100644
--- a/lldb/source/Host/posix/MainLoopPosix.cpp
+++ b/lldb/source/Host/posix/MainLoopPosix.cpp
@@ -222,7 +222,7 @@ void MainLoopPosix::RunImpl::ProcessEvents() {
 }
 #endif
 
-MainLoopPosix::MainLoopPosix() {
+MainLoopPosix::MainLoopPosix() : m_triggering(false) {
   Status error = m_trigger_pipe.CreateNew(/*child_process_inherit=*/false);
   assert(error.Success());
   const int trigger_pipe_fd = m_trigger_pipe.GetReadFileDescriptor();
@@ -371,6 +371,7 @@ Status MainLoopPosix::Run() {
 
 impl.ProcessEvents();
 
+m_triggering = false;
 ProcessPendingCallbacks();
   }
   return Status();
@@ -395,6 +396,9 @@ void MainLoopPosix::ProcessSignal(int signo) {
 }
 
 void MainLoopPosix::TriggerPendingCallbacks() {
+  if (m_triggering.exchange(true))
+return;
+
   char c = '.';
   size_t bytes_written;
   Status error = m_trigger_pipe.Write(&c, 1, bytes_written);

diff  --git a/lldb/unittests/Host/MainLoopTest.cpp 
b/lldb/unittests/Host/MainLoopTest.cpp
index 00e85514463fe..b1857fec3c49e 100644
--- a/lldb/unittests/Host/MainLoopTest.cpp
+++ b/lldb/unittests/Host/MainLoopTest.cpp
@@ -171,6 +171,17 @@ TEST_F(MainLoopTest, PendingCallbackTrigger) {
   ASSERT_TRUE(callback2_called);
 }
 
+// Regression test for assertion failure if a lot of callbacks end up
+// being queued after loop exits.
+TEST_F(MainLoopTest, PendingCallbackAfterLoopExited) {
+  MainLoop loop;
+  Status error;
+  ASSERT_TRUE(loop.Run().Success());
+  // Try to fill the pipe buffer in.
+  for (int i = 0; i < 65536; ++i)
+loop.AddPendingCallback([&](MainLoopBase &loop) {});
+}
+
 #ifdef LLVM_ON_UNIX
 TEST_F(MainLoopTest, DetectsEOF) {
 



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


[Lldb-commits] [PATCH] D135516: [lldb] [MainLoopPosix] Fix crash upon adding lots of pending callbacks

2022-10-17 Thread Michał Górny via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
mgorny marked an inline comment as done.
Closed by commit rGe8ee0f121dbc: [lldb] [MainLoopPosix] Fix crash upon adding 
lots of pending callbacks (authored by mgorny).
Herald added a project: LLDB.

Changed prior to commit:
  https://reviews.llvm.org/D135516?vs=467834&id=468222#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135516

Files:
  lldb/include/lldb/Host/posix/MainLoopPosix.h
  lldb/source/Host/posix/MainLoopPosix.cpp
  lldb/unittests/Host/MainLoopTest.cpp


Index: lldb/unittests/Host/MainLoopTest.cpp
===
--- lldb/unittests/Host/MainLoopTest.cpp
+++ lldb/unittests/Host/MainLoopTest.cpp
@@ -171,6 +171,17 @@
   ASSERT_TRUE(callback2_called);
 }
 
+// Regression test for assertion failure if a lot of callbacks end up
+// being queued after loop exits.
+TEST_F(MainLoopTest, PendingCallbackAfterLoopExited) {
+  MainLoop loop;
+  Status error;
+  ASSERT_TRUE(loop.Run().Success());
+  // Try to fill the pipe buffer in.
+  for (int i = 0; i < 65536; ++i)
+loop.AddPendingCallback([&](MainLoopBase &loop) {});
+}
+
 #ifdef LLVM_ON_UNIX
 TEST_F(MainLoopTest, DetectsEOF) {
 
Index: lldb/source/Host/posix/MainLoopPosix.cpp
===
--- lldb/source/Host/posix/MainLoopPosix.cpp
+++ lldb/source/Host/posix/MainLoopPosix.cpp
@@ -222,7 +222,7 @@
 }
 #endif
 
-MainLoopPosix::MainLoopPosix() {
+MainLoopPosix::MainLoopPosix() : m_triggering(false) {
   Status error = m_trigger_pipe.CreateNew(/*child_process_inherit=*/false);
   assert(error.Success());
   const int trigger_pipe_fd = m_trigger_pipe.GetReadFileDescriptor();
@@ -371,6 +371,7 @@
 
 impl.ProcessEvents();
 
+m_triggering = false;
 ProcessPendingCallbacks();
   }
   return Status();
@@ -395,6 +396,9 @@
 }
 
 void MainLoopPosix::TriggerPendingCallbacks() {
+  if (m_triggering.exchange(true))
+return;
+
   char c = '.';
   size_t bytes_written;
   Status error = m_trigger_pipe.Write(&c, 1, bytes_written);
Index: lldb/include/lldb/Host/posix/MainLoopPosix.h
===
--- lldb/include/lldb/Host/posix/MainLoopPosix.h
+++ lldb/include/lldb/Host/posix/MainLoopPosix.h
@@ -13,6 +13,7 @@
 #include "lldb/Host/MainLoopBase.h"
 #include "lldb/Host/Pipe.h"
 #include "llvm/ADT/DenseMap.h"
+#include 
 #include 
 #include 
 #include 
@@ -87,6 +88,7 @@
   llvm::DenseMap m_read_fds;
   llvm::DenseMap m_signals;
   Pipe m_trigger_pipe;
+  std::atomic m_triggering;
 #if HAVE_SYS_EVENT_H
   int m_kqueue;
 #endif


Index: lldb/unittests/Host/MainLoopTest.cpp
===
--- lldb/unittests/Host/MainLoopTest.cpp
+++ lldb/unittests/Host/MainLoopTest.cpp
@@ -171,6 +171,17 @@
   ASSERT_TRUE(callback2_called);
 }
 
+// Regression test for assertion failure if a lot of callbacks end up
+// being queued after loop exits.
+TEST_F(MainLoopTest, PendingCallbackAfterLoopExited) {
+  MainLoop loop;
+  Status error;
+  ASSERT_TRUE(loop.Run().Success());
+  // Try to fill the pipe buffer in.
+  for (int i = 0; i < 65536; ++i)
+loop.AddPendingCallback([&](MainLoopBase &loop) {});
+}
+
 #ifdef LLVM_ON_UNIX
 TEST_F(MainLoopTest, DetectsEOF) {
 
Index: lldb/source/Host/posix/MainLoopPosix.cpp
===
--- lldb/source/Host/posix/MainLoopPosix.cpp
+++ lldb/source/Host/posix/MainLoopPosix.cpp
@@ -222,7 +222,7 @@
 }
 #endif
 
-MainLoopPosix::MainLoopPosix() {
+MainLoopPosix::MainLoopPosix() : m_triggering(false) {
   Status error = m_trigger_pipe.CreateNew(/*child_process_inherit=*/false);
   assert(error.Success());
   const int trigger_pipe_fd = m_trigger_pipe.GetReadFileDescriptor();
@@ -371,6 +371,7 @@
 
 impl.ProcessEvents();
 
+m_triggering = false;
 ProcessPendingCallbacks();
   }
   return Status();
@@ -395,6 +396,9 @@
 }
 
 void MainLoopPosix::TriggerPendingCallbacks() {
+  if (m_triggering.exchange(true))
+return;
+
   char c = '.';
   size_t bytes_written;
   Status error = m_trigger_pipe.Write(&c, 1, bytes_written);
Index: lldb/include/lldb/Host/posix/MainLoopPosix.h
===
--- lldb/include/lldb/Host/posix/MainLoopPosix.h
+++ lldb/include/lldb/Host/posix/MainLoopPosix.h
@@ -13,6 +13,7 @@
 #include "lldb/Host/MainLoopBase.h"
 #include "lldb/Host/Pipe.h"
 #include "llvm/ADT/DenseMap.h"
+#include 
 #include 
 #include 
 #include 
@@ -87,6 +88,7 @@
   llvm::DenseMap m_read_fds;
   llvm::DenseMap m_signals;
   Pipe m_trigger_pipe;
+  std::atomic m_triggering;
 #if HAVE_SYS_EVENT_H
   int m_kqueue;
 #endif
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list

[Lldb-commits] [lldb] 569be95 - [lldb] Print newline between found types

2022-10-17 Thread Arthur Eubanks via lldb-commits

Author: Arthur Eubanks
Date: 2022-10-17T14:24:21-07:00
New Revision: 569be95a40893041f8cadf2907a5970a19b1155f

URL: 
https://github.com/llvm/llvm-project/commit/569be95a40893041f8cadf2907a5970a19b1155f
DIFF: 
https://github.com/llvm/llvm-project/commit/569be95a40893041f8cadf2907a5970a19b1155f.diff

LOG: [lldb] Print newline between found types

Or else multiple entries end up overlapping on the same line.

Reviewed By: DavidSpickett

Differential Revision: https://reviews.llvm.org/D135827

Added: 
lldb/test/API/lang/cpp/type_lookup_duplicate/Makefile
lldb/test/API/lang/cpp/type_lookup_duplicate/TestCppTypeLookupDuplicate.py
lldb/test/API/lang/cpp/type_lookup_duplicate/main.cpp

Modified: 
lldb/source/Commands/CommandObjectTarget.cpp

Removed: 




diff  --git a/lldb/source/Commands/CommandObjectTarget.cpp 
b/lldb/source/Commands/CommandObjectTarget.cpp
index 59b7dfd74e852..61ac468ec90d8 100644
--- a/lldb/source/Commands/CommandObjectTarget.cpp
+++ b/lldb/source/Commands/CommandObjectTarget.cpp
@@ -1663,8 +1663,8 @@ static size_t LookupTypeInModule(Target *target,
 typedef_type_sp = typedefed_type_sp;
 typedefed_type_sp = typedef_type_sp->GetTypedefType();
   }
+  strm.EOL();
 }
-strm.EOL();
   }
   return type_list.GetSize();
 }

diff  --git a/lldb/test/API/lang/cpp/type_lookup_duplicate/Makefile 
b/lldb/test/API/lang/cpp/type_lookup_duplicate/Makefile
new file mode 100644
index 0..3d0b98f13f3d7
--- /dev/null
+++ b/lldb/test/API/lang/cpp/type_lookup_duplicate/Makefile
@@ -0,0 +1,2 @@
+CXX_SOURCES := main.cpp
+include Makefile.rules

diff  --git 
a/lldb/test/API/lang/cpp/type_lookup_duplicate/TestCppTypeLookupDuplicate.py 
b/lldb/test/API/lang/cpp/type_lookup_duplicate/TestCppTypeLookupDuplicate.py
new file mode 100644
index 0..8268ea15d2207
--- /dev/null
+++ b/lldb/test/API/lang/cpp/type_lookup_duplicate/TestCppTypeLookupDuplicate.py
@@ -0,0 +1,16 @@
+"""
+Test that we properly print multiple types.
+"""
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import decorators
+
+class TestTypeLookupDuplicate(TestBase):
+
+def test_namespace_only(self):
+self.build()
+lldbutil.run_to_source_breakpoint(self, "// Set breakpoint here", 
lldb.SBFileSpec("main.cpp"))
+
+self.expect("image lookup -A -t Foo", DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs=["2 matches found", "\nid =", "\nid ="])

diff  --git a/lldb/test/API/lang/cpp/type_lookup_duplicate/main.cpp 
b/lldb/test/API/lang/cpp/type_lookup_duplicate/main.cpp
new file mode 100644
index 0..2518aafe9fc29
--- /dev/null
+++ b/lldb/test/API/lang/cpp/type_lookup_duplicate/main.cpp
@@ -0,0 +1,13 @@
+namespace a {
+struct Foo {};
+} // namespace a
+
+namespace b {
+struct Foo {};
+} // namespace b
+
+int main() {
+  a::Foo a;
+  b::Foo b;
+  return 0; // Set breakpoint here
+}



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


[Lldb-commits] [PATCH] D135827: [lldb] Print newline between found types

2022-10-17 Thread Arthur Eubanks via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG569be95a4089: [lldb] Print newline between found types 
(authored by aeubanks).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135827

Files:
  lldb/source/Commands/CommandObjectTarget.cpp
  lldb/test/API/lang/cpp/type_lookup_duplicate/Makefile
  lldb/test/API/lang/cpp/type_lookup_duplicate/TestCppTypeLookupDuplicate.py
  lldb/test/API/lang/cpp/type_lookup_duplicate/main.cpp


Index: lldb/test/API/lang/cpp/type_lookup_duplicate/main.cpp
===
--- /dev/null
+++ lldb/test/API/lang/cpp/type_lookup_duplicate/main.cpp
@@ -0,0 +1,13 @@
+namespace a {
+struct Foo {};
+} // namespace a
+
+namespace b {
+struct Foo {};
+} // namespace b
+
+int main() {
+  a::Foo a;
+  b::Foo b;
+  return 0; // Set breakpoint here
+}
Index: 
lldb/test/API/lang/cpp/type_lookup_duplicate/TestCppTypeLookupDuplicate.py
===
--- /dev/null
+++ lldb/test/API/lang/cpp/type_lookup_duplicate/TestCppTypeLookupDuplicate.py
@@ -0,0 +1,16 @@
+"""
+Test that we properly print multiple types.
+"""
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import decorators
+
+class TestTypeLookupDuplicate(TestBase):
+
+def test_namespace_only(self):
+self.build()
+lldbutil.run_to_source_breakpoint(self, "// Set breakpoint here", 
lldb.SBFileSpec("main.cpp"))
+
+self.expect("image lookup -A -t Foo", DATA_TYPES_DISPLAYED_CORRECTLY, 
substrs=["2 matches found", "\nid =", "\nid ="])
Index: lldb/test/API/lang/cpp/type_lookup_duplicate/Makefile
===
--- /dev/null
+++ lldb/test/API/lang/cpp/type_lookup_duplicate/Makefile
@@ -0,0 +1,2 @@
+CXX_SOURCES := main.cpp
+include Makefile.rules
Index: lldb/source/Commands/CommandObjectTarget.cpp
===
--- lldb/source/Commands/CommandObjectTarget.cpp
+++ lldb/source/Commands/CommandObjectTarget.cpp
@@ -1663,8 +1663,8 @@
 typedef_type_sp = typedefed_type_sp;
 typedefed_type_sp = typedef_type_sp->GetTypedefType();
   }
+  strm.EOL();
 }
-strm.EOL();
   }
   return type_list.GetSize();
 }


Index: lldb/test/API/lang/cpp/type_lookup_duplicate/main.cpp
===
--- /dev/null
+++ lldb/test/API/lang/cpp/type_lookup_duplicate/main.cpp
@@ -0,0 +1,13 @@
+namespace a {
+struct Foo {};
+} // namespace a
+
+namespace b {
+struct Foo {};
+} // namespace b
+
+int main() {
+  a::Foo a;
+  b::Foo b;
+  return 0; // Set breakpoint here
+}
Index: lldb/test/API/lang/cpp/type_lookup_duplicate/TestCppTypeLookupDuplicate.py
===
--- /dev/null
+++ lldb/test/API/lang/cpp/type_lookup_duplicate/TestCppTypeLookupDuplicate.py
@@ -0,0 +1,16 @@
+"""
+Test that we properly print multiple types.
+"""
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+from lldbsuite.test.lldbtest import *
+from lldbsuite.test import decorators
+
+class TestTypeLookupDuplicate(TestBase):
+
+def test_namespace_only(self):
+self.build()
+lldbutil.run_to_source_breakpoint(self, "// Set breakpoint here", lldb.SBFileSpec("main.cpp"))
+
+self.expect("image lookup -A -t Foo", DATA_TYPES_DISPLAYED_CORRECTLY, substrs=["2 matches found", "\nid =", "\nid ="])
Index: lldb/test/API/lang/cpp/type_lookup_duplicate/Makefile
===
--- /dev/null
+++ lldb/test/API/lang/cpp/type_lookup_duplicate/Makefile
@@ -0,0 +1,2 @@
+CXX_SOURCES := main.cpp
+include Makefile.rules
Index: lldb/source/Commands/CommandObjectTarget.cpp
===
--- lldb/source/Commands/CommandObjectTarget.cpp
+++ lldb/source/Commands/CommandObjectTarget.cpp
@@ -1663,8 +1663,8 @@
 typedef_type_sp = typedefed_type_sp;
 typedefed_type_sp = typedef_type_sp->GetTypedefType();
   }
+  strm.EOL();
 }
-strm.EOL();
   }
   return type_list.GetSize();
 }
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D135998: Make sure Target::EvaluateExpression() passes up an error instead of silently dropping it.

2022-10-17 Thread Jim Ingham via Phabricator via lldb-commits
jingham accepted this revision.
jingham added a comment.
This revision is now accepted and ready to land.

LGTM.

It's a bit wrong that UserExpression::Evaluate takes an error and a 
result_valobj_sp.  What would it mean if result_valobj_sp->GetError() was 
something, but something different from the error parameter?  ValueObjects are 
supposed to carry their error with them, so really this should just always make 
a ValueObject and put the error in it.

But that wrongness is not of your making, and this patch does what should 
happen, make the ValueObject carry the significant error.  So as a short term 
fix this is fine.

It's also unfortunate that we don't have a ValueObjectError that just knows its 
error & its user-chosen name.  ValueObjectConstResult is carrying a lot of 
water at this point.  OTOH, it's the best choice of the classes we currently 
have.


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

https://reviews.llvm.org/D135998

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


[Lldb-commits] [PATCH] D136114: [lldb] Allow SymbolFileDWARFDebugMap to register multiple compile units

2022-10-17 Thread Augusto Noronha via Phabricator via lldb-commits
augusto2112 created this revision.
augusto2112 added reviewers: aprantl, jasonmolenda, jingham.
Herald added a project: All.
augusto2112 requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: lldb-commits, sstefan1.
Herald added a project: LLDB.

Currently, SymbolFileDWARFDebugMap works on the assumption that there is
only one compile unit per object file. This patch documents this
limitation (when using the general SymbolFile API), and allows users of
the concrete SymbolFileDWARFDebugMap class to find out about these extra
compile units.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136114

Files:
  lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
  lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h

Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -19,6 +19,7 @@
 #include "UniqueDWARFASTType.h"
 
 class SymbolFileDWARF;
+class DWARFCompileUnit;
 class DWARFDebugAranges;
 class DWARFDeclContext;
 
@@ -174,7 +175,10 @@
 llvm::sys::TimePoint<> oso_mod_time;
 lldb_private::Status oso_load_error;
 OSOInfoSP oso_sp;
+// The first compile unit, which appears in the nlist symbol table.
 lldb::CompUnitSP compile_unit_sp;
+// The rest of the compile units that an object file contains.
+llvm::SmallVector extra_compile_units_sps;
 uint32_t first_symbol_index = UINT32_MAX;
 uint32_t last_symbol_index = UINT32_MAX;
 uint32_t first_symbol_id = UINT32_MAX;
@@ -193,7 +197,17 @@
   // Protected Member Functions
   void InitOSO();
 
+  /// This function actually returns the number of object files, which may be
+  /// less than the actual number of compile units, since an object file may
+  /// contain more than one compile unit. SymbolFileDWARFDebugMap looks up the
+  /// number of compile units by reading the nlist symbol table, which
+  /// currently, on macOS, only reports one compile unit per object file, and
+  /// there's no efficient way to calculate the actual number of compile units
+  /// upfront.
   uint32_t CalculateNumCompileUnits() override;
+
+  /// This function actually returns the first compile unit the object file at
+  /// the given index contains.
   lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
 
   static uint32_t GetOSOIndexFromUserID(lldb::user_id_t uid) {
@@ -263,7 +277,11 @@
   void SetCompileUnit(SymbolFileDWARF *oso_dwarf,
   const lldb::CompUnitSP &cu_sp);
 
-  lldb::CompUnitSP GetCompileUnit(SymbolFileDWARF *oso_dwarf);
+  /// Returns the compile unit associated with the dwarf compile unit. This may
+  /// be one of the extra compile units an object file contains which isn't
+  /// reachable by ParseCompileUnitAtIndex(uint32_t).
+  lldb::CompUnitSP GetCompileUnit(SymbolFileDWARF *oso_dwarf,
+  DWARFCompileUnit &dwarf_cu);
 
   CompileUnitInfo *GetCompileUnitInfo(SymbolFileDWARF *oso_dwarf);
 
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -7,7 +7,9 @@
 //===--===//
 
 #include "SymbolFileDWARFDebugMap.h"
+#include "DWARFCompileUnit.h"
 #include "DWARFDebugAranges.h"
+#include "DWARFDebugInfo.h"
 
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleList.h"
@@ -17,6 +19,7 @@
 #include "lldb/Utility/RangeMap.h"
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/Timer.h"
+#include "lldb/Utility/StreamString.h"
 
 //#define DEBUG_OSO_DMAP // DO NOT CHECKIN WITH THIS NOT COMMENTED OUT
 #if defined(DEBUG_OSO_DMAP)
@@ -586,25 +589,40 @@
   const uint32_t cu_count = GetNumCompileUnits();
 
   if (cu_idx < cu_count) {
-Module *oso_module = GetModuleByCompUnitInfo(&m_compile_unit_infos[cu_idx]);
+auto &cu_info = m_compile_unit_infos[cu_idx];
+Module *oso_module = GetModuleByCompUnitInfo(&cu_info);
 if (oso_module) {
   FileSpec so_file_spec;
   if (GetFileSpecForSO(cu_idx, so_file_spec)) {
 // User zero as the ID to match the compile unit at offset zero in each
-// .o file since each .o file can only have one compile unit for now.
+// .o file since each .o file.
 lldb::user_id_t cu_id = 0;
 m_compile_unit_infos[cu_idx].compile_unit_sp =
 std::make_shared(
 m_objfile_sp->GetModule(), nullptr, so_file_spe

[Lldb-commits] [PATCH] D136114: [lldb] Allow SymbolFileDWARFDebugMap to register multiple compile units

2022-10-17 Thread Augusto Noronha via Phabricator via lldb-commits
augusto2112 updated this revision to Diff 468337.
augusto2112 added a comment.

Remote extra semi-colon


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136114

Files:
  lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
  lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h

Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h
@@ -19,6 +19,7 @@
 #include "UniqueDWARFASTType.h"
 
 class SymbolFileDWARF;
+class DWARFCompileUnit;
 class DWARFDebugAranges;
 class DWARFDeclContext;
 
@@ -174,7 +175,10 @@
 llvm::sys::TimePoint<> oso_mod_time;
 lldb_private::Status oso_load_error;
 OSOInfoSP oso_sp;
+// The first compile unit, which appears in the nlist symbol table.
 lldb::CompUnitSP compile_unit_sp;
+// The rest of the compile units that an object file contains.
+llvm::SmallVector extra_compile_units_sps;
 uint32_t first_symbol_index = UINT32_MAX;
 uint32_t last_symbol_index = UINT32_MAX;
 uint32_t first_symbol_id = UINT32_MAX;
@@ -193,7 +197,17 @@
   // Protected Member Functions
   void InitOSO();
 
+  /// This function actually returns the number of object files, which may be
+  /// less than the actual number of compile units, since an object file may
+  /// contain more than one compile unit. SymbolFileDWARFDebugMap looks up the
+  /// number of compile units by reading the nlist symbol table, which
+  /// currently, on macOS, only reports one compile unit per object file, and
+  /// there's no efficient way to calculate the actual number of compile units
+  /// upfront.
   uint32_t CalculateNumCompileUnits() override;
+
+  /// This function actually returns the first compile unit the object file at
+  /// the given index contains.
   lldb::CompUnitSP ParseCompileUnitAtIndex(uint32_t index) override;
 
   static uint32_t GetOSOIndexFromUserID(lldb::user_id_t uid) {
@@ -263,7 +277,11 @@
   void SetCompileUnit(SymbolFileDWARF *oso_dwarf,
   const lldb::CompUnitSP &cu_sp);
 
-  lldb::CompUnitSP GetCompileUnit(SymbolFileDWARF *oso_dwarf);
+  /// Returns the compile unit associated with the dwarf compile unit. This may
+  /// be one of the extra compile units an object file contains which isn't
+  /// reachable by ParseCompileUnitAtIndex(uint32_t).
+  lldb::CompUnitSP GetCompileUnit(SymbolFileDWARF *oso_dwarf,
+  DWARFCompileUnit &dwarf_cu);
 
   CompileUnitInfo *GetCompileUnitInfo(SymbolFileDWARF *oso_dwarf);
 
Index: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
===
--- lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
+++ lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp
@@ -7,7 +7,9 @@
 //===--===//
 
 #include "SymbolFileDWARFDebugMap.h"
+#include "DWARFCompileUnit.h"
 #include "DWARFDebugAranges.h"
+#include "DWARFDebugInfo.h"
 
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleList.h"
@@ -17,6 +19,7 @@
 #include "lldb/Utility/RangeMap.h"
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/Timer.h"
+#include "lldb/Utility/StreamString.h"
 
 //#define DEBUG_OSO_DMAP // DO NOT CHECKIN WITH THIS NOT COMMENTED OUT
 #if defined(DEBUG_OSO_DMAP)
@@ -586,25 +589,40 @@
   const uint32_t cu_count = GetNumCompileUnits();
 
   if (cu_idx < cu_count) {
-Module *oso_module = GetModuleByCompUnitInfo(&m_compile_unit_infos[cu_idx]);
+auto &cu_info = m_compile_unit_infos[cu_idx];
+Module *oso_module = GetModuleByCompUnitInfo(&cu_info);
 if (oso_module) {
   FileSpec so_file_spec;
   if (GetFileSpecForSO(cu_idx, so_file_spec)) {
 // User zero as the ID to match the compile unit at offset zero in each
-// .o file since each .o file can only have one compile unit for now.
+// .o file since each .o file.
 lldb::user_id_t cu_id = 0;
 m_compile_unit_infos[cu_idx].compile_unit_sp =
 std::make_shared(
 m_objfile_sp->GetModule(), nullptr, so_file_spec, cu_id,
 eLanguageTypeUnknown, eLazyBoolCalculate);
-
-if (m_compile_unit_infos[cu_idx].compile_unit_sp) {
-  SetCompileUnitAtIndex(cu_idx,
-m_compile_unit_infos[cu_idx].compile_unit_sp);
+if (cu_info.compile_unit_sp) 
+  SetCompileUnitAtIndex(cu_idx, cu_info.compile_unit_sp);
+  }
+  // If there's a symbol file also register all the extra compile units.
+  if (SymbolFileD

[Lldb-commits] [PATCH] D135998: Make sure Target::EvaluateExpression() passes up an error instead of silently dropping it.

2022-10-17 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment.

> It's a bit wrong that UserExpression::Evaluate takes an error and a 
> result_valobj_sp.

I agree. I might be fixing that in a follow-up commit.


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

https://reviews.llvm.org/D135998

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


[Lldb-commits] [lldb] a31a5da - Make sure Target::EvaluateExpression() passes up an error instead of silently dropping it.

2022-10-17 Thread Adrian Prantl via lldb-commits

Author: Adrian Prantl
Date: 2022-10-17T15:21:41-07:00
New Revision: a31a5da3c7d7393749a43dbc678fd28fb94d07f6

URL: 
https://github.com/llvm/llvm-project/commit/a31a5da3c7d7393749a43dbc678fd28fb94d07f6
DIFF: 
https://github.com/llvm/llvm-project/commit/a31a5da3c7d7393749a43dbc678fd28fb94d07f6.diff

LOG: Make sure Target::EvaluateExpression() passes up an error instead of 
silently dropping it.

When UserExpression::Evaluate() fails and doesn't return a ValueObject there is 
no vehicle for returning the error in the return value.

This behavior can be observed by applying the following patch:

diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index f1a311b7252c..58c03ccdb068 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -2370,6 +2370,7 @@ UserExpression *Target::GetUserExpressionForLanguage(
 Expression::ResultType desired_type,
 const EvaluateExpressionOptions &options, ValueObject *ctx_obj,
 Status &error) {
+  error.SetErrorStringWithFormat("Ha ha!");  return nullptr;
   auto type_system_or_err = GetScratchTypeSystemForLanguage(language);
   if (auto err = type_system_or_err.takeError()) {
 error.SetErrorStringWithFormat(

and then running

$ lldb -o "p 1"
(lldb) p 1
(lldb)

This patch fixes this by creating an empty result ValueObject that wraps the 
error.

Differential Revision: https://reviews.llvm.org/D135998

Added: 


Modified: 
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/Target/Target.cpp

Removed: 




diff  --git a/lldb/source/Commands/CommandObjectExpression.cpp 
b/lldb/source/Commands/CommandObjectExpression.cpp
index b7d129e1d7df..be306f20881d 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -461,6 +461,8 @@ bool 
CommandObjectExpression::EvaluateExpression(llvm::StringRef expr,
 result.SetStatus(eReturnStatusFailed);
   }
 }
+  } else {
+error_stream.Printf("error: unknown error\n");
   }
 
   return (success != eExpressionSetupError &&

diff  --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index c567407757e3..f1a311b7252c 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -26,6 +26,7 @@
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/Core/ValueObject.h"
+#include "lldb/Core/ValueObjectConstResult.h"
 #include "lldb/Expression/DiagnosticManager.h"
 #include "lldb/Expression/ExpressionVariable.h"
 #include "lldb/Expression/REPL.h"
@@ -2528,6 +2529,10 @@ ExpressionResults Target::EvaluateExpression(
 execution_results = UserExpression::Evaluate(exe_ctx, options, expr, 
prefix,
  result_valobj_sp, error,
  fixed_expression, ctx_obj);
+// Pass up the error by wrapping it inside an error result.
+if (error.Fail() && !result_valobj_sp)
+  result_valobj_sp = ValueObjectConstResult::Create(
+  exe_ctx.GetBestExecutionContextScope(), error);
   }
 
   if (execution_results == eExpressionCompleted)



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


[Lldb-commits] [PATCH] D135998: Make sure Target::EvaluateExpression() passes up an error instead of silently dropping it.

2022-10-17 Thread Adrian Prantl via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa31a5da3c7d7: Make sure Target::EvaluateExpression() passes 
up an error instead of silently… (authored by aprantl).
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135998

Files:
  lldb/source/Commands/CommandObjectExpression.cpp
  lldb/source/Target/Target.cpp


Index: lldb/source/Target/Target.cpp
===
--- lldb/source/Target/Target.cpp
+++ lldb/source/Target/Target.cpp
@@ -26,6 +26,7 @@
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/Core/ValueObject.h"
+#include "lldb/Core/ValueObjectConstResult.h"
 #include "lldb/Expression/DiagnosticManager.h"
 #include "lldb/Expression/ExpressionVariable.h"
 #include "lldb/Expression/REPL.h"
@@ -2528,6 +2529,10 @@
 execution_results = UserExpression::Evaluate(exe_ctx, options, expr, 
prefix,
  result_valobj_sp, error,
  fixed_expression, ctx_obj);
+// Pass up the error by wrapping it inside an error result.
+if (error.Fail() && !result_valobj_sp)
+  result_valobj_sp = ValueObjectConstResult::Create(
+  exe_ctx.GetBestExecutionContextScope(), error);
   }
 
   if (execution_results == eExpressionCompleted)
Index: lldb/source/Commands/CommandObjectExpression.cpp
===
--- lldb/source/Commands/CommandObjectExpression.cpp
+++ lldb/source/Commands/CommandObjectExpression.cpp
@@ -461,6 +461,8 @@
 result.SetStatus(eReturnStatusFailed);
   }
 }
+  } else {
+error_stream.Printf("error: unknown error\n");
   }
 
   return (success != eExpressionSetupError &&


Index: lldb/source/Target/Target.cpp
===
--- lldb/source/Target/Target.cpp
+++ lldb/source/Target/Target.cpp
@@ -26,6 +26,7 @@
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/Core/ValueObject.h"
+#include "lldb/Core/ValueObjectConstResult.h"
 #include "lldb/Expression/DiagnosticManager.h"
 #include "lldb/Expression/ExpressionVariable.h"
 #include "lldb/Expression/REPL.h"
@@ -2528,6 +2529,10 @@
 execution_results = UserExpression::Evaluate(exe_ctx, options, expr, prefix,
  result_valobj_sp, error,
  fixed_expression, ctx_obj);
+// Pass up the error by wrapping it inside an error result.
+if (error.Fail() && !result_valobj_sp)
+  result_valobj_sp = ValueObjectConstResult::Create(
+  exe_ctx.GetBestExecutionContextScope(), error);
   }
 
   if (execution_results == eExpressionCompleted)
Index: lldb/source/Commands/CommandObjectExpression.cpp
===
--- lldb/source/Commands/CommandObjectExpression.cpp
+++ lldb/source/Commands/CommandObjectExpression.cpp
@@ -461,6 +461,8 @@
 result.SetStatus(eReturnStatusFailed);
   }
 }
+  } else {
+error_stream.Printf("error: unknown error\n");
   }
 
   return (success != eExpressionSetupError &&
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D136006: [LLDB][NativePDB] Fix ParseAllNamespacesPlusChildrenOf and avoid duplicate iteration on symbol stream

2022-10-17 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu updated this revision to Diff 468362.
zequanwu added a comment.

update.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136006

Files:
  lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
  lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h

Index: lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h
===
--- lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h
+++ lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.h
@@ -11,6 +11,7 @@
 
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/StringRef.h"
+#include "llvm/Support/Threading.h"
 
 #include "Plugins/ExpressionParser/Clang/ClangASTImporter.h"
 
@@ -122,7 +123,9 @@
  TypeIndex func_ti, CompilerType func_ct,
  uint32_t param_count, clang::StorageClass func_storage,
  bool is_inline, clang::DeclContext *parent);
-  void ParseAllNamespacesPlusChildrenOf(llvm::Optional parent);
+  void ParseNamespace(clang::DeclContext &parent);
+  void ParseAllTypes();
+  void ParseAllFunctionsAndNonLocalVars();
   void ParseDeclsForSimpleContext(clang::DeclContext &context);
   void ParseBlockChildren(PdbCompilandSymId block_id);
 
@@ -135,7 +138,8 @@
   TypeSystemClang &m_clang;
 
   ClangASTImporter m_importer;
-
+  llvm::once_flag m_parse_functions_and_non_local_vars;
+  llvm::once_flag m_parse_all_types;
   llvm::DenseMap m_decl_to_status;
   llvm::DenseMap m_uid_to_decl;
   llvm::DenseMap m_uid_to_type;
@@ -145,6 +149,7 @@
   llvm::DenseMap, 8>>
   m_cxx_record_map;
+  llvm::DenseSet m_parsed_namespaces;
 };
 
 } // namespace npdb
Index: lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
===
--- lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
+++ lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
@@ -21,7 +21,6 @@
 #include "lldb/Core/Module.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Utility/LLDBAssert.h"
-
 #include "PdbUtil.h"
 #include "UdtRecordCompleter.h"
 #include "SymbolFileNativePDB.h"
@@ -1232,8 +1231,11 @@
   return llvm::isa(&context);
 }
 
-void PdbAstBuilder::ParseAllNamespacesPlusChildrenOf(
-llvm::Optional parent) {
+void PdbAstBuilder::ParseNamespace(clang::DeclContext &context) {
+  clang::NamespaceDecl *ns = llvm::dyn_cast(&context);
+  if (m_parsed_namespaces.contains(ns))
+return;
+  std::string qname = ns->getQualifiedNameAsString();
   SymbolFileNativePDB *pdb = static_cast(
   m_clang.GetSymbolFile()->GetBackingSymbolFile());
   PdbIndex &index = pdb->GetIndex();
@@ -1247,12 +1249,6 @@
 
 CVTagRecord tag = CVTagRecord::create(cvt);
 
-if (!parent) {
-  clang::QualType qt = GetOrCreateType(tid);
-  CompleteType(qt);
-  continue;
-}
-
 // Call CreateDeclInfoForType unconditionally so that the namespace info
 // gets created.  But only call CreateRecordType if the namespace name
 // matches.
@@ -1263,41 +1259,71 @@
   continue;
 
 clang::NamespaceDecl *ns = llvm::cast(context);
-std::string actual_ns = ns->getQualifiedNameAsString();
-if (llvm::StringRef(actual_ns).startswith(*parent)) {
-  clang::QualType qt = GetOrCreateType(tid);
-  CompleteType(qt);
-  continue;
+llvm::StringRef ns_name = ns->getName();
+if (ns_name.startswith(qname)) {
+  ns_name = ns_name.drop_front(qname.size());
+  if (ns_name.startswith("::")) {
+clang::QualType qt = GetOrCreateType(tid);
+CompleteType(qt);
+  }
 }
   }
+  ParseAllFunctionsAndNonLocalVars();
+  m_parsed_namespaces.insert(ns);
+}
 
-  uint32_t module_count = index.dbi().modules().getModuleCount();
-  for (uint16_t modi = 0; modi < module_count; ++modi) {
-CompilandIndexItem &cii = index.compilands().GetOrCreateCompiland(modi);
-const CVSymbolArray &symbols = cii.m_debug_stream.getSymbolArray();
-auto iter = symbols.begin();
-while (iter != symbols.end()) {
-  PdbCompilandSymId sym_id{modi, iter.offset()};
-
-  switch (iter->kind()) {
-  case S_GPROC32:
-  case S_LPROC32:
-GetOrCreateFunctionDecl(sym_id);
-iter = symbols.at(getScopeEndOffset(*iter));
-break;
-  case S_GDATA32:
-  case S_GTHREAD32:
-  case S_LDATA32:
-  case S_LTHREAD32:
-GetOrCreateVariableDecl(PdbCompilandSymId(modi, 0), sym_id);
-++iter;
-break;
-  default:
-++iter;
+void PdbAstBuilder::ParseAllTypes() {
+  llvm::call_once(m_parse_all_types, [this]() {
+SymbolFileNativePDB *pdb = static_cast(
+m_clang.GetSymbolFile()->GetBackingSymbolFile());
+PdbIndex &index = pdb->GetIndex();
+TypeIndex ti{index.tpi().TypeIndexBegin()};
+for (const CVType &cvt : index.tpi().typeArray()) {
+  PdbTypeSymId tid{ti};
+  ++ti;
+
+  if (!IsTagRecord(cvt)

[Lldb-commits] [PATCH] D135998: Make sure Target::EvaluateExpression() passes up an error instead of silently dropping it.

2022-10-17 Thread Stella Stamenova via Phabricator via lldb-commits
stella.stamenova added a comment.
Herald added subscribers: Michael137, JDevlieghere.

I think this change broke the windows lldb bot: 
https://lab.llvm.org/buildbot/#/builders/83/builds/24905


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135998

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


[Lldb-commits] [lldb] 2c9093e - Revert "Make sure Target::EvaluateExpression() passes up an error instead of silently dropping it."

2022-10-17 Thread Adrian Prantl via lldb-commits

Author: Adrian Prantl
Date: 2022-10-17T17:27:54-07:00
New Revision: 2c9093e649c4078c1083f489b72dda7ad54baea5

URL: 
https://github.com/llvm/llvm-project/commit/2c9093e649c4078c1083f489b72dda7ad54baea5
DIFF: 
https://github.com/llvm/llvm-project/commit/2c9093e649c4078c1083f489b72dda7ad54baea5.diff

LOG: Revert "Make sure Target::EvaluateExpression() passes up an error instead 
of silently dropping it."

This reverts commit a31a5da3c7d7393749a43dbc678fd28fb94d07f6.

Added: 


Modified: 
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/Target/Target.cpp

Removed: 




diff  --git a/lldb/source/Commands/CommandObjectExpression.cpp 
b/lldb/source/Commands/CommandObjectExpression.cpp
index be306f20881d2..b7d129e1d7df6 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -461,8 +461,6 @@ bool 
CommandObjectExpression::EvaluateExpression(llvm::StringRef expr,
 result.SetStatus(eReturnStatusFailed);
   }
 }
-  } else {
-error_stream.Printf("error: unknown error\n");
   }
 
   return (success != eExpressionSetupError &&

diff  --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index f1a311b7252cb..c567407757e39 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -26,7 +26,6 @@
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/Core/ValueObject.h"
-#include "lldb/Core/ValueObjectConstResult.h"
 #include "lldb/Expression/DiagnosticManager.h"
 #include "lldb/Expression/ExpressionVariable.h"
 #include "lldb/Expression/REPL.h"
@@ -2529,10 +2528,6 @@ ExpressionResults Target::EvaluateExpression(
 execution_results = UserExpression::Evaluate(exe_ctx, options, expr, 
prefix,
  result_valobj_sp, error,
  fixed_expression, ctx_obj);
-// Pass up the error by wrapping it inside an error result.
-if (error.Fail() && !result_valobj_sp)
-  result_valobj_sp = ValueObjectConstResult::Create(
-  exe_ctx.GetBestExecutionContextScope(), error);
   }
 
   if (execution_results == eExpressionCompleted)



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


[Lldb-commits] [lldb] dd5c5f7 - Make sure Target::EvaluateExpression() passes up an error instead of silently dropping it.

2022-10-17 Thread Adrian Prantl via lldb-commits

Author: Adrian Prantl
Date: 2022-10-17T17:27:54-07:00
New Revision: dd5c5f72e00dca0e2458139fec09b1a715cfb238

URL: 
https://github.com/llvm/llvm-project/commit/dd5c5f72e00dca0e2458139fec09b1a715cfb238
DIFF: 
https://github.com/llvm/llvm-project/commit/dd5c5f72e00dca0e2458139fec09b1a715cfb238.diff

LOG: Make sure Target::EvaluateExpression() passes up an error instead of 
silently dropping it.

When UserExpression::Evaluate() fails and doesn't return a ValueObject there is 
no vehicle for returning the error in the return value.

This behavior can be observed by applying the following patch:

diff --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index f1a311b7252c..58c03ccdb068 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -2370,6 +2370,7 @@ UserExpression *Target::GetUserExpressionForLanguage(
 Expression::ResultType desired_type,
 const EvaluateExpressionOptions &options, ValueObject *ctx_obj,
 Status &error) {
+  error.SetErrorStringWithFormat("Ha ha!");  return nullptr;
   auto type_system_or_err = GetScratchTypeSystemForLanguage(language);
   if (auto err = type_system_or_err.takeError()) {
 error.SetErrorStringWithFormat(

and then running

$ lldb -o "p 1"
(lldb) p 1
(lldb)

This patch fixes this by creating an empty result ValueObject that wraps the 
error.

Differential Revision: https://reviews.llvm.org/D135998

Added: 


Modified: 
lldb/source/Commands/CommandObjectExpression.cpp
lldb/source/Target/Target.cpp
lldb/test/API/commands/expression/context-object/TestContextObject.py
lldb/test/API/commands/expression/fixits/TestFixIts.py

Removed: 




diff  --git a/lldb/source/Commands/CommandObjectExpression.cpp 
b/lldb/source/Commands/CommandObjectExpression.cpp
index b7d129e1d7df6..be306f20881d2 100644
--- a/lldb/source/Commands/CommandObjectExpression.cpp
+++ b/lldb/source/Commands/CommandObjectExpression.cpp
@@ -461,6 +461,8 @@ bool 
CommandObjectExpression::EvaluateExpression(llvm::StringRef expr,
 result.SetStatus(eReturnStatusFailed);
   }
 }
+  } else {
+error_stream.Printf("error: unknown error\n");
   }
 
   return (success != eExpressionSetupError &&

diff  --git a/lldb/source/Target/Target.cpp b/lldb/source/Target/Target.cpp
index c567407757e39..f1a311b7252cb 100644
--- a/lldb/source/Target/Target.cpp
+++ b/lldb/source/Target/Target.cpp
@@ -26,6 +26,7 @@
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/StructuredDataImpl.h"
 #include "lldb/Core/ValueObject.h"
+#include "lldb/Core/ValueObjectConstResult.h"
 #include "lldb/Expression/DiagnosticManager.h"
 #include "lldb/Expression/ExpressionVariable.h"
 #include "lldb/Expression/REPL.h"
@@ -2528,6 +2529,10 @@ ExpressionResults Target::EvaluateExpression(
 execution_results = UserExpression::Evaluate(exe_ctx, options, expr, 
prefix,
  result_valobj_sp, error,
  fixed_expression, ctx_obj);
+// Pass up the error by wrapping it inside an error result.
+if (error.Fail() && !result_valobj_sp)
+  result_valobj_sp = ValueObjectConstResult::Create(
+  exe_ctx.GetBestExecutionContextScope(), error);
   }
 
   if (execution_results == eExpressionCompleted)

diff  --git 
a/lldb/test/API/commands/expression/context-object/TestContextObject.py 
b/lldb/test/API/commands/expression/context-object/TestContextObject.py
index 45f7a003837b9..7c963ebd846c1 100644
--- a/lldb/test/API/commands/expression/context-object/TestContextObject.py
+++ b/lldb/test/API/commands/expression/context-object/TestContextObject.py
@@ -67,7 +67,7 @@ def test_context_object(self):
 
 # Test an expression evaluation
 value = obj_val.EvaluateExpression("1")
-self.assertFalse(value.IsValid())
+self.assertTrue(value.IsValid())
 self.assertFalse(value.GetError().Success())
 
 #
@@ -79,7 +79,7 @@ def test_context_object(self):
 
 # Test an expression evaluation
 value = obj_val.EvaluateExpression("1")
-self.assertFalse(value.IsValid())
+self.assertTrue(value.IsValid())
 self.assertFalse(value.GetError().Success())
 
 # Test retrieveing of an element's field
@@ -97,7 +97,7 @@ def test_context_object(self):
 
 # Test an expression evaluation
 value = obj_val.EvaluateExpression("1")
-self.assertFalse(value.IsValid())
+self.assertTrue(value.IsValid())
 self.assertFalse(value.GetError().Success())
 
 # Test retrieveing of a dereferenced object's field
@@ -127,7 +127,7 @@ def test_context_object(self):
 
 # Test an expression evaluation
 value = obj_val.EvaluateExpression("1")
-self.assertFalse(value.IsValid())
+self.assertTrue(value.IsValid())
 self.assertFalse(value.GetError().Success())
 
   

[Lldb-commits] [PATCH] D135998: Make sure Target::EvaluateExpression() passes up an error instead of silently dropping it.

2022-10-17 Thread Adrian Prantl via Phabricator via lldb-commits
aprantl added a comment.

Turns out this did have an effect on the test suite: There was one test that 
expected a failing expression to have an invalid SBValue and an Error:

  diff --git 
a/lldb/test/API/commands/expression/context-object/TestContextObject.py 
b/lldb/test/API/c
  ommands/expression/context-object/TestContextObject.py
  index 45f7a003837b..7c963ebd846c 100644
  --- a/lldb/test/API/commands/expression/context-object/TestContextObject.py
  +++ b/lldb/test/API/commands/expression/context-object/TestContextObject.py
  @@ -67,7 +67,7 @@ class ContextObjectTestCase(TestBase):
   
   # Test an expression evaluation
   value = obj_val.EvaluateExpression("1")
  -self.assertFalse(value.IsValid())
  +self.assertTrue(value.IsValid())
   self.assertFalse(value.GetError().Success())
   
   #


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135998

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


[Lldb-commits] [PATCH] D136034: [lldb][trace] Add a basic function call dump [3] - Add a JSON dumper

2022-10-17 Thread Jakob Johnson via Phabricator via lldb-commits
jj10306 accepted this revision.
jj10306 added a comment.
This revision is now accepted and ready to land.

nice! using this in conjunction with trace cursor we'll be able to produce some 
nice visualizations - lgtm


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136034

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


[Lldb-commits] [PATCH] D134066: [LLDB][NativePDB] Forcefully complete a record type it has incomplete type debug info.

2022-10-17 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added inline comments.



Comment at: lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp:681
+auto &ts = llvm::cast(*ct.GetTypeSystem());
+ts.GetMetadata(&tag)->SetIsForcefullyCompleted();
+  }

zequanwu wrote:
> labath wrote:
> > zequanwu wrote:
> > > rnk wrote:
> > > > Is this what we do for DWARF? The same kind of situation seems like it 
> > > > can arise, where clang requires a type to be complete, but the 
> > > > information is missing, and we still try to proceed with evaluation.
> > > I think it's here: 
> > > https://github.com/llvm/llvm-project/blob/main/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp#L221-L250,
> > >  relevant: https://reviews.llvm.org/D85968.
> > The trick is to do the forced completion only when the type is used within 
> > contexts where the c++ rules require it to be complete. something like 
> > `class A; A* a;` is perfectly legal c++. `class A; class B : A {};` is not. 
> > You can't do this from within the completion callback. In DWARF code, we 
> > check for this when we're parsing the enclosing entity (so, when we're 
> > parsing `B`, we'd check, and if needed, "forcefully complete" the class `A`.
> What does dwarf plugin do in this case that we don't have debug info for 
> class A: `class A; class B : A {};`? The problem I'm trying to fix is when 
> the base class has no debug info to complete it.
@labath, Do you see anything would go wrong if we forcefully complete a class 
that has no debug info? It seems fine, for the chrome crash report I was 
checking.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134066

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


[Lldb-commits] [PATCH] D136114: [lldb] Allow SymbolFileDWARFDebugMap to register multiple compile units

2022-10-17 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments.



Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp:55
 
-  if (debug_aranges->GetNumRanges() == num_debug_aranges) {
+  if (debug_aranges->GetNumRanges() == num_debug_aranges && cu_offset == 0) {
 // We got nothing from the debug info, maybe we have a line tables only

This isn't a valid requirement for general code. It essentially means that this 
code will only run for the first compile unit in an elf file (or, if type units 
are in use, it may not run at all).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136114

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


[Lldb-commits] [PATCH] D134066: [LLDB][NativePDB] Forcefully complete a record type it has incomplete type debug info.

2022-10-17 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments.



Comment at: lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp:681
+auto &ts = llvm::cast(*ct.GetTypeSystem());
+ts.GetMetadata(&tag)->SetIsForcefullyCompleted();
+  }

zequanwu wrote:
> zequanwu wrote:
> > labath wrote:
> > > zequanwu wrote:
> > > > rnk wrote:
> > > > > Is this what we do for DWARF? The same kind of situation seems like 
> > > > > it can arise, where clang requires a type to be complete, but the 
> > > > > information is missing, and we still try to proceed with evaluation.
> > > > I think it's here: 
> > > > https://github.com/llvm/llvm-project/blob/main/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp#L221-L250,
> > > >  relevant: https://reviews.llvm.org/D85968.
> > > The trick is to do the forced completion only when the type is used 
> > > within contexts where the c++ rules require it to be complete. something 
> > > like `class A; A* a;` is perfectly legal c++. `class A; class B : A {};` 
> > > is not. You can't do this from within the completion callback. In DWARF 
> > > code, we check for this when we're parsing the enclosing entity (so, when 
> > > we're parsing `B`, we'd check, and if needed, "forcefully complete" the 
> > > class `A`.
> > What does dwarf plugin do in this case that we don't have debug info for 
> > class A: `class A; class B : A {};`? The problem I'm trying to fix is when 
> > the base class has no debug info to complete it.
> @labath, Do you see anything would go wrong if we forcefully complete a class 
> that has no debug info? It seems fine, for the chrome crash report I was 
> checking.
I don't think anything will blow up, if that's what you're asking. The way I 
think this will manifest itself is that various opaque types that are supposed 
to be incomplete (e.g. this is often the case with the `FILE` type in the C 
library) will suddenly become complete (and empty). That in turn can have 
various (more or less subtle) effects on the way these objects can be viewed 
and manipulated by the user. It's not the end of the world, but given that this 
forceful completion business is essentially a giant hack, I think it makes 
sense to limit its scope as much as possible.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134066

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


[Lldb-commits] [PATCH] D136006: [LLDB][NativePDB] Improve ParseDeclsForContext time.

2022-10-17 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment.

Is this purely a performance optimization, or does it have some impact on 
operation (its correctness) as well? E.g. does it prevent duplicate 
construction of some types or something like that?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D136006

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


[Lldb-commits] [PATCH] D135648: [lldb] Add matching based on Python callbacks for data formatters.

2022-10-17 Thread Pavel Labath via Phabricator via lldb-commits
labath accepted this revision.
labath added a comment.
This revision is now accepted and ready to land.

Seems fine to me. Jim, Med, do you want to add anything?


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

https://reviews.llvm.org/D135648

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