[Lldb-commits] [PATCH] D114796: [lldb/qemu] Add support for pty redirection

2021-12-01 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/D114796/new/

https://reviews.llvm.org/D114796

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


[Lldb-commits] [PATCH] D114288: [NFC] Refactor symbol table parsing.

2021-12-01 Thread Muhammad Omair Javaid via Phabricator via lldb-commits
omjavaid added a comment.

Hi @clayborg 
This breaks LLDB Arm/Linux buildbot. 
https://lab.llvm.org/buildbot/#/builders/17/builds/14035


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114288

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


[Lldb-commits] [PATCH] D114861: Don't consider frames with different PCs as a loop

2021-12-01 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha created this revision.
tatyana-krasnukha added reviewers: labath, jasonmolenda.
tatyana-krasnukha added a project: LLDB.
Herald added a subscriber: JDevlieghere.
tatyana-krasnukha requested review of this revision.
Herald added a subscriber: lldb-commits.

A compiler can produce FDE records with no CFA offset if it doesn't save 
anything on stack for a frame. This is what the MetaWare compiler does for some 
functions - it doesn't update CFA since it saves return address to a register.
In this case LLDB fails to unwind the stack complaining about a loop. This 
patch checks also the return addresses of the frames, there is no loop if they 
differ.

This is also consistent with how UnwindLLDB::GetOneMoreFrame identifies 
infinite loops.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114861

Files:
  lldb/source/Target/RegisterContextUnwind.cpp


Index: lldb/source/Target/RegisterContextUnwind.cpp
===
--- lldb/source/Target/RegisterContextUnwind.cpp
+++ lldb/source/Target/RegisterContextUnwind.cpp
@@ -690,28 +690,29 @@
   // -- or even more devious, we can actually oscillate between two CFA values.
   // Detect that here and break out to avoid a possible infinite loop in lldb
   // trying to unwind the stack. To detect when we have the same CFA value
-  // multiple times, we compare the
-  // CFA of the current
-  // frame with the 2nd next frame because in some specail case (e.g. signal
-  // hanlders, hand written assembly without ABI compliance) we can have 2
-  // frames with the same
-  // CFA (in theory we
-  // can have arbitrary number of frames with the same CFA, but more then 2 is
-  // very very unlikely)
+  // multiple times, we compare the CFA of the current frame with the 2nd next
+  // frame because in some specail case (e.g. signal hanlders, hand written
+  // assembly without ABI compiance) we can have 2 frames with the same CFA (in
+  // theory we can have arbitrary number of frames with the same CFA, but more
+  // then 2 is very very unlikely).
 
   RegisterContextUnwind::SharedPtr next_frame = GetNextFrame();
-  if (next_frame) {
-RegisterContextUnwind::SharedPtr next_next_frame =
-next_frame->GetNextFrame();
-addr_t next_next_frame_cfa = LLDB_INVALID_ADDRESS;
-if (next_next_frame && next_next_frame->GetCFA(next_next_frame_cfa)) {
-  if (next_next_frame_cfa == m_cfa) {
-// We have a loop in the stack unwind
-return true;
-  }
-}
-  }
-  return false;
+  if (!next_frame)
+return false;
+
+  RegisterContextUnwind::SharedPtr next_next_frame = 
next_frame->GetNextFrame();
+  if (!next_next_frame)
+return false;
+
+  // Since the return address value can be restored not only from the stack but
+  // also from a register, don't consider frames with the same CFAs and 
different
+  // PCs as a loop.
+  if (m_current_pc.IsValid() && (m_current_pc != next_next_frame->GetPC()))
+return false;
+
+  addr_t next_next_frame_cfa = LLDB_INVALID_ADDRESS;
+  return next_next_frame->GetCFA(next_next_frame_cfa) &&
+ next_next_frame_cfa == m_cfa;
 }
 
 bool RegisterContextUnwind::IsFrameZero() const { return m_frame_number == 0; }


Index: lldb/source/Target/RegisterContextUnwind.cpp
===
--- lldb/source/Target/RegisterContextUnwind.cpp
+++ lldb/source/Target/RegisterContextUnwind.cpp
@@ -690,28 +690,29 @@
   // -- or even more devious, we can actually oscillate between two CFA values.
   // Detect that here and break out to avoid a possible infinite loop in lldb
   // trying to unwind the stack. To detect when we have the same CFA value
-  // multiple times, we compare the
-  // CFA of the current
-  // frame with the 2nd next frame because in some specail case (e.g. signal
-  // hanlders, hand written assembly without ABI compliance) we can have 2
-  // frames with the same
-  // CFA (in theory we
-  // can have arbitrary number of frames with the same CFA, but more then 2 is
-  // very very unlikely)
+  // multiple times, we compare the CFA of the current frame with the 2nd next
+  // frame because in some specail case (e.g. signal hanlders, hand written
+  // assembly without ABI compiance) we can have 2 frames with the same CFA (in
+  // theory we can have arbitrary number of frames with the same CFA, but more
+  // then 2 is very very unlikely).
 
   RegisterContextUnwind::SharedPtr next_frame = GetNextFrame();
-  if (next_frame) {
-RegisterContextUnwind::SharedPtr next_next_frame =
-next_frame->GetNextFrame();
-addr_t next_next_frame_cfa = LLDB_INVALID_ADDRESS;
-if (next_next_frame && next_next_frame->GetCFA(next_next_frame_cfa)) {
-  if (next_next_frame_cfa == m_cfa) {
-// We have a loop in the stack unwind
-return true;
-  }
-}
-  }
-  return false;
+  if (!next_frame)
+return false;
+
+  RegisterContextUnwind::SharedPtr 

[Lldb-commits] [PATCH] D114862: Replace StackID's operator "<" with a function returning FrameComparison

2021-12-01 Thread Tatyana Krasnukha via Phabricator via lldb-commits
tatyana-krasnukha created this revision.
tatyana-krasnukha added reviewers: labath, jasonmolenda.
tatyana-krasnukha added a project: LLDB.
Herald added a subscriber: JDevlieghere.
tatyana-krasnukha requested review of this revision.
Herald added a subscriber: lldb-commits.

"false" result of the operator can imply not only "the frame is not younger". 
When CFAs are equal, StackID's operator "<" can only compare symbol contexts of 
the same function. Otherwise, it also returns false.

In the case I described in D114861 , two 
different frames can have the same CFA, and then the operator's result may be 
incorrect. "thread step-*" commands get broken in this case.

This patch replaces the operator that can return only boolean value with the 
function that returns a value of lldb::FrameComparison type. It also updates 
thread plans to use this function instead of the operator.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114862

Files:
  lldb/include/lldb/Target/StackID.h
  lldb/include/lldb/Target/ThreadPlanStepOut.h
  lldb/source/Target/StackFrameList.cpp
  lldb/source/Target/StackID.cpp
  lldb/source/Target/ThreadPlanStepInstruction.cpp
  lldb/source/Target/ThreadPlanStepOut.cpp
  lldb/source/Target/ThreadPlanStepRange.cpp
  lldb/source/Target/ThreadPlanStepUntil.cpp

Index: lldb/source/Target/ThreadPlanStepUntil.cpp
===
--- lldb/source/Target/ThreadPlanStepUntil.cpp
+++ lldb/source/Target/ThreadPlanStepUntil.cpp
@@ -173,7 +173,7 @@
 bool done;
 StackID cur_frame_zero_id;
 
-done = (m_stack_id < cur_frame_zero_id);
+done = m_stack_id.CompareTo(cur_frame_zero_id) == eFrameCompareYounger;
 
 if (done) {
   m_stepped_out = true;
@@ -197,11 +197,13 @@
 StackID frame_zero_id =
 thread.GetStackFrameAtIndex(0)->GetStackID();
 
-if (frame_zero_id == m_stack_id)
+auto frame_compare = frame_zero_id.CompareTo(m_stack_id);
+
+if (frame_compare == eFrameCompareEqual)
   done = true;
-else if (frame_zero_id < m_stack_id)
+else if (frame_compare == eFrameCompareYounger)
   done = false;
-else {
+else if (frame_compare == eFrameCompareOlder) {
   StackFrameSP older_frame_sp = thread.GetStackFrameAtIndex(1);
 
   // But if we can't even unwind one frame we should just get out
@@ -216,7 +218,8 @@
 done = (older_context == stack_context);
   } else
 done = false;
-}
+} else
+  done = thread.GetRegisterContext()->GetPC(0) == m_return_addr;
 
 if (done)
   SetPlanComplete();
Index: lldb/source/Target/ThreadPlanStepRange.cpp
===
--- lldb/source/Target/ThreadPlanStepRange.cpp
+++ lldb/source/Target/ThreadPlanStepRange.cpp
@@ -213,25 +213,21 @@
 // to the current list.
 
 lldb::FrameComparison ThreadPlanStepRange::CompareCurrentFrameToStartFrame() {
-  FrameComparison frame_order;
   Thread &thread = GetThread();
   StackID cur_frame_id = thread.GetStackFrameAtIndex(0)->GetStackID();
 
-  if (cur_frame_id == m_stack_id) {
-frame_order = eFrameCompareEqual;
-  } else if (cur_frame_id < m_stack_id) {
-frame_order = eFrameCompareYounger;
-  } else {
-StackFrameSP cur_parent_frame = thread.GetStackFrameAtIndex(1);
-StackID cur_parent_id;
-if (cur_parent_frame)
-  cur_parent_id = cur_parent_frame->GetStackID();
+  auto frame_order = cur_frame_id.CompareTo(m_stack_id);
+  if (frame_order != eFrameCompareUnknown)
+return frame_order;
+
+  StackFrameSP cur_parent_frame = thread.GetStackFrameAtIndex(1);
+  if (cur_parent_frame) {
+StackID cur_parent_id = cur_parent_frame->GetStackID();
 if (m_parent_stack_id.IsValid() && cur_parent_id.IsValid() &&
 m_parent_stack_id == cur_parent_id)
   frame_order = eFrameCompareSameParent;
-else
-  frame_order = eFrameCompareOlder;
   }
+
   return frame_order;
 }
 
Index: lldb/source/Target/ThreadPlanStepOut.cpp
===
--- lldb/source/Target/ThreadPlanStepOut.cpp
+++ lldb/source/Target/ThreadPlanStepOut.cpp
@@ -293,22 +293,7 @@
   BreakpointSiteSP site_sp(
   m_process.GetBreakpointSiteList().FindByID(stop_info_sp->GetValue()));
   if (site_sp && site_sp->IsBreakpointAtThisSite(m_return_bp_id)) {
-bool done;
-
-StackID frame_zero_id =
-GetThread().GetStackFrameAtIndex(0)->GetStackID();
-
-if (m_step_out_to_id == frame_zero_id)
-  done = true;
-else if (m_step_out_to_id < frame_zero_id) {
-  // Either we stepped past the breakpoint, or the stack ID calculation
-  // was incorrect and we should probably stop.
-  

[Lldb-commits] [PATCH] D114877: [lldb] Add missing space in C string format memory read warning

2021-12-01 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett created this revision.
DavidSpickett requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Also add tests to check that we print the warning in the right
circumstances.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114877

Files:
  lldb/source/Commands/CommandObjectMemory.cpp
  lldb/test/API/commands/memory/read/Makefile
  lldb/test/API/commands/memory/read/TestMemoryRead.py
  lldb/test/API/commands/memory/read/main.c

Index: lldb/test/API/commands/memory/read/main.c
===
--- /dev/null
+++ lldb/test/API/commands/memory/read/main.c
@@ -0,0 +1,4 @@
+int main() {
+  char the_string[] = {'a', 'b', 'c', 'd', 0};
+  return 0; // Set break point at this line.
+}
Index: lldb/test/API/commands/memory/read/TestMemoryRead.py
===
--- /dev/null
+++ lldb/test/API/commands/memory/read/TestMemoryRead.py
@@ -0,0 +1,69 @@
+"""
+Test the 'memory read' command.
+"""
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+
+class MemoryWriteTestCase(TestBase):
+
+mydir = TestBase.compute_mydir(__file__)
+
+def setUp(self):
+# Call super's setUp().
+TestBase.setUp(self)
+# Find the line number to break inside main().
+self.line = line_number('main.c', '// Set break point at this line.')
+
+def build_run_stop(self):
+self.build()
+exe = self.getBuildArtifact("a.out")
+self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+# Break in main() after the variables are assigned values.
+lldbutil.run_break_set_by_file_and_line(self,
+"main.c",
+self.line,
+num_expected_locations=1,
+loc_exact=True)
+
+self.runCmd("run", RUN_SUCCEEDED)
+
+# The stop reason of the thread should be breakpoint.
+self.expect("thread list",
+STOPPED_DUE_TO_BREAKPOINT,
+substrs=['stopped', 'stop reason = breakpoint'])
+
+# The breakpoint should have a hit count of 1.
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
+
+@no_debug_info_test
+def test_memory_read_c_string(self):
+"""Test that reading memory as a c string respects the size limit given
+   and warns if the null terminator is missing."""
+self.build_run_stop()
+
+# The size here is the size in memory so it includes the null terminator.
+
+# Size matches the size of the array.
+self.expect(
+"memory read --format \"c-string\" --size 5 &the_string",
+substrs=['\"abcd\"'])
+
+# If size would take us past the terminator we stop at the terminator.
+self.expect(
+"memory read --format \"c-string\" --size 10 &the_string",
+substrs=['\"abcd\"'])
+
+# Size 3 means 2 chars and a terminator. So we print 2 chars but warn because
+# the third isn't 0 as expected.
+self.expect(
+"memory read --format \"c-string\" --size 3 &the_string",
+substrs=['\"ab\"'])
+self.assertRegex(self.res.GetError(),
+"unable to find a NULL terminated string at 0x[0-9A-fa-f]+."
+" Consider increasing the maximum read length.")
Index: lldb/test/API/commands/memory/read/Makefile
===
--- /dev/null
+++ lldb/test/API/commands/memory/read/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
Index: lldb/source/Commands/CommandObjectMemory.cpp
===
--- lldb/source/Commands/CommandObjectMemory.cpp
+++ lldb/source/Commands/CommandObjectMemory.cpp
@@ -716,7 +716,7 @@
 if (item_byte_size == read) {
   result.AppendWarningWithFormat(
   "unable to find a NULL terminated string at 0x%" PRIx64
-  ".Consider increasing the maximum read length.\n",
+  ". Consider increasing the maximum read length.\n",
   data_addr);
   --read;
   break_on_no_NULL = true;
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D114877: [lldb] Add missing space in C string format memory read warning

2021-12-01 Thread David Spickett via Phabricator via lldb-commits
DavidSpickett updated this revision to Diff 391013.
DavidSpickett added a comment.

Put the command in a string and add in the size each time since that's all that 
changes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114877

Files:
  lldb/source/Commands/CommandObjectMemory.cpp
  lldb/test/API/commands/memory/read/Makefile
  lldb/test/API/commands/memory/read/TestMemoryRead.py
  lldb/test/API/commands/memory/read/main.c


Index: lldb/test/API/commands/memory/read/main.c
===
--- /dev/null
+++ lldb/test/API/commands/memory/read/main.c
@@ -0,0 +1,4 @@
+int main() {
+  char the_string[] = {'a', 'b', 'c', 'd', 0};
+  return 0; // Set break point at this line.
+}
Index: lldb/test/API/commands/memory/read/TestMemoryRead.py
===
--- /dev/null
+++ lldb/test/API/commands/memory/read/TestMemoryRead.py
@@ -0,0 +1,64 @@
+"""
+Test the 'memory read' command.
+"""
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+
+from lldbsuite.test.decorators import *
+from lldbsuite.test.lldbtest import *
+
+
+class MemoryWriteTestCase(TestBase):
+
+mydir = TestBase.compute_mydir(__file__)
+
+def setUp(self):
+# Call super's setUp().
+TestBase.setUp(self)
+# Find the line number to break inside main().
+self.line = line_number('main.c', '// Set break point at this line.')
+
+def build_run_stop(self):
+self.build()
+exe = self.getBuildArtifact("a.out")
+self.runCmd("file " + exe, CURRENT_EXECUTABLE_SET)
+
+# Break in main() after the variables are assigned values.
+lldbutil.run_break_set_by_file_and_line(self,
+"main.c",
+self.line,
+num_expected_locations=1,
+loc_exact=True)
+
+self.runCmd("run", RUN_SUCCEEDED)
+
+# The stop reason of the thread should be breakpoint.
+self.expect("thread list",
+STOPPED_DUE_TO_BREAKPOINT,
+substrs=['stopped', 'stop reason = breakpoint'])
+
+# The breakpoint should have a hit count of 1.
+lldbutil.check_breakpoint(self, bpno = 1, expected_hit_count = 1)
+
+@no_debug_info_test
+def test_memory_read_c_string(self):
+"""Test that reading memory as a c string respects the size limit given
+   and warns if the null terminator is missing."""
+self.build_run_stop()
+
+# The size here is the size in memory so it includes the null 
terminator.
+cmd = "memory read --format \"c-string\" --size {} &the_string"
+
+# Size matches the size of the array.
+self.expect(cmd.format(5), substrs=['\"abcd\"'])
+
+# If size would take us past the terminator we stop at the terminator.
+self.expect(cmd.format(10), substrs=['\"abcd\"'])
+
+# Size 3 means 2 chars and a terminator. So we print 2 chars but warn 
because
+# the third isn't 0 as expected.
+self.expect(cmd.format(3), substrs=['\"ab\"'])
+self.assertRegex(self.res.GetError(),
+"unable to find a NULL terminated string at 0x[0-9A-fa-f]+."
+" Consider increasing the maximum read length.")
Index: lldb/test/API/commands/memory/read/Makefile
===
--- /dev/null
+++ lldb/test/API/commands/memory/read/Makefile
@@ -0,0 +1,3 @@
+C_SOURCES := main.c
+
+include Makefile.rules
Index: lldb/source/Commands/CommandObjectMemory.cpp
===
--- lldb/source/Commands/CommandObjectMemory.cpp
+++ lldb/source/Commands/CommandObjectMemory.cpp
@@ -716,7 +716,7 @@
 if (item_byte_size == read) {
   result.AppendWarningWithFormat(
   "unable to find a NULL terminated string at 0x%" PRIx64
-  ".Consider increasing the maximum read length.\n",
+  ". Consider increasing the maximum read length.\n",
   data_addr);
   --read;
   break_on_no_NULL = true;


Index: lldb/test/API/commands/memory/read/main.c
===
--- /dev/null
+++ lldb/test/API/commands/memory/read/main.c
@@ -0,0 +1,4 @@
+int main() {
+  char the_string[] = {'a', 'b', 'c', 'd', 0};
+  return 0; // Set break point at this line.
+}
Index: lldb/test/API/commands/memory/read/TestMemoryRead.py
===
--- /dev/null
+++ lldb/test/API/commands/memory/read/TestMemoryRead.py
@@ -0,0 +1,64 @@
+"""
+Test the 'memory read' command.
+"""
+
+import lldb
+import lldbsuite.test.lldbutil as lldbutil
+
+from lldbsuite.test.decorato

[Lldb-commits] [PATCH] D113930: [LLDB][NativePDB] Fix function decl creation for class methods

2021-12-01 Thread Reid Kleckner via Phabricator via lldb-commits
rnk added inline comments.



Comment at: lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp:1019
+  if (parent->isRecord()) {
+struct ProcessOneMethodRecord : public TypeVisitorCallbacks {
+  ProcessOneMethodRecord(PdbIndex &m_index, TypeSystemClang &m_clang,

As a style thing, this class is quite large, I think I would prefer to see this 
at global scope in an anonymous namespace.



Comment at: lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp:89
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (void)"
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char)"
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char, int, ...)"

I guess the test isn't able to differentiate whether these methods are static, 
private, etc. =/

We can overlook that for now, but I think now is the time to invest in better 
testing tools. The lldb-test program can do whatever you need it to, I don't 
think changing it requires updating that many tests, I think it's something you 
should look into.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113930

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


[Lldb-commits] [lldb] da7e3fc - Revert "[lldb] Temporarily skip TestTsanBasic on Darwin"

2021-12-01 Thread Jonas Devlieghere via lldb-commits

Author: Jonas Devlieghere
Date: 2021-12-01T10:40:42-08:00
New Revision: da7e3fc9abed2f0d8b48c16a9f774318bb1fb1e1

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

LOG: Revert "[lldb] Temporarily skip TestTsanBasic on Darwin"

This reverts commit 92a8dc0735cfb3f296f0c487b20d8fa8474e3e40 because
66d4ce7e26a5ab00f7e4946b6e1bac8f805010fa was reverted in 09859113ed23.

Added: 


Modified: 
lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py

Removed: 




diff  --git a/lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py 
b/lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py
index 556551ead8e6c..17684050572ba 100644
--- a/lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py
+++ b/lldb/test/API/functionalities/tsan/basic/TestTsanBasic.py
@@ -20,7 +20,6 @@ class TsanBasicTestCase(TestBase):
 @skipIfFreeBSD  # llvm.org/pr21136 runtimes not yet available by default
 @skipIfRemote
 @skipUnlessThreadSanitizer
-@expectedFailureDarwin # FIXME: https://reviews.llvm.org/D112603
 @no_debug_info_test
 def test(self):
 self.build()



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


[Lldb-commits] [PATCH] D114288: [NFC] Refactor symbol table parsing.

2021-12-01 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added a comment.

In D114288#3163808 , @omjavaid wrote:

> Hi @clayborg 
> This breaks LLDB Arm/Linux buildbot. 
> https://lab.llvm.org/buildbot/#/builders/17/builds/14035

I will check this out on linux. Any reason why I did not get a message to my 
email that this was failing?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114288

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


[Lldb-commits] [PATCH] D113930: [LLDB][NativePDB] Fix function decl creation for class methods

2021-12-01 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu updated this revision to Diff 391115.
zequanwu marked an inline comment as done.
zequanwu added a comment.

Fix style.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113930

Files:
  lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
  lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp

Index: lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp
===
--- lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp
+++ lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp
@@ -1,7 +1,7 @@
 // clang-format off
 // REQUIRES: lld, x86
 
-// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
+// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /GR- /Fo%t.obj -- %s
 // RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
 
 // RUN: lldb-test symbols --find=function --name=main --function-flags=full %t.exe \
@@ -13,6 +13,46 @@
 // RUN: lldb-test symbols --find=function --name=varargs_fn --function-flags=full %t.exe \
 // RUN: | FileCheck %s --check-prefix=FIND-VAR
 
+// RUN: lldb-test symbols --find=function --name=Struct::simple_method --function-flags=full %t.exe \
+// RUN: | FileCheck %s --check-prefix=FIND-SIMPLE
+
+// RUN: lldb-test symbols --find=function --name=Struct::virtual_method --function-flags=full %t.exe \
+// RUN: | FileCheck %s --check-prefix=FIND-VIRTUAL
+
+// RUN: lldb-test symbols --find=function --name=Struct::static_method --function-flags=full %t.exe \
+// RUN: | FileCheck %s --check-prefix=FIND-STATIC-METHOD
+
+// RUN: lldb-test symbols --find=function --name=Struct::overloaded_method --function-flags=full %t.exe \
+// RUN: | FileCheck %s --check-prefix=FIND-OVERLOAD
+
+struct Struct {
+  int simple_method() {
+return 1;
+  }
+
+  virtual int virtual_method() {
+return 2;
+  }
+
+  static int static_method() {
+return 3;
+  }
+
+  int overloaded_method() {
+return 4 + overloaded_method('a') + overloaded_method('a', 1);
+  }
+protected:
+  virtual int overloaded_method(char c) {
+return 5;
+  }
+private:
+  static int overloaded_method(char c, int i, ...) {
+return 6;
+  }
+};
+
+Struct s;
+
 static int static_fn() {
   return 42;
 }
@@ -22,7 +62,8 @@
 }
 
 int main(int argc, char **argv) {
-  return static_fn() + varargs_fn(argc, argc);
+  return static_fn() + varargs_fn(argc, argc) + s.simple_method() +
+  Struct::static_method() + s.virtual_method() + s.overloaded_method();
 }
 
 // FIND-MAIN:  Function: id = {{.*}}, name = "main"
@@ -33,3 +74,17 @@
 
 // FIND-VAR:  Function: id = {{.*}}, name = "{{.*}}varargs_fn{{.*}}"
 // FIND-VAR-NEXT: FuncType: id = {{.*}}, compiler_type = "int (int, int, ...)"
+
+// FIND-SIMPLE:  Function: id = {{.*}}, name = "{{.*}}Struct::simple_method{{.*}}"
+// FIND-SIMPLE-NEXT: FuncType: id = {{.*}}, compiler_type = "int (void)"
+
+// FIND-VIRTUAL:  Function: id = {{.*}}, name = "{{.*}}Struct::virtual_method{{.*}}"
+// FIND-VIRTUAL-NEXT: FuncType: id = {{.*}}, compiler_type = "int (void)"
+
+// FIND-STATIC-METHOD:  Function: id = {{.*}}, name = "{{.*}}Struct::static_method{{.*}}"
+// FIND-STATIC-METHOD-NEXT: FuncType: id = {{.*}}, compiler_type = "int (void)"
+
+// FIND-OVERLOAD: Function: id = {{.*}}, name = "{{.*}}Struct::overloaded_method{{.*}}"
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (void)"
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char)"
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char, int, ...)"
Index: lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
===
--- lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
+++ lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
@@ -30,6 +30,67 @@
 using namespace llvm::codeview;
 using namespace llvm::pdb;
 
+namespace {
+struct CreateMethodDecl : public TypeVisitorCallbacks {
+  CreateMethodDecl(PdbIndex &m_index, TypeSystemClang &m_clang,
+   clang::FunctionDecl *&function_decl,
+   lldb::opaque_compiler_type_t parent_ty,
+   llvm::StringRef proc_name, CompilerType func_ct)
+  : m_index(m_index), m_clang(m_clang), function_decl(function_decl),
+parent_ty(parent_ty), proc_name(proc_name), func_ct(func_ct) {}
+  PdbIndex &m_index;
+  TypeSystemClang &m_clang;
+  clang::FunctionDecl *&function_decl;
+  lldb::opaque_compiler_type_t parent_ty;
+  llvm::StringRef proc_name;
+  CompilerType func_ct;
+
+  llvm::Error visitKnownMember(CVMemberRecord &cvr,
+   OverloadedMethodRecord &overloaded) override {
+if (!function_decl) {
+  TypeIndex method_list_idx = overloaded.MethodList;
+
+  CVType method_list_type = m_index.tpi().getType(method_list_idx);
+  assert(method_list_type.kind() ==

[Lldb-commits] [PATCH] D113930: [LLDB][NativePDB] Fix function decl creation for class methods

2021-12-01 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu added inline comments.



Comment at: lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp:89
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (void)"
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char)"
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char, int, ...)"

rnk wrote:
> I guess the test isn't able to differentiate whether these methods are 
> static, private, etc. =/
> 
> We can overlook that for now, but I think now is the time to invest in better 
> testing tools. The lldb-test program can do whatever you need it to, I don't 
> think changing it requires updating that many tests, I think it's something 
> you should look into.
There is already a way to get those info (static, virtual, except access type) 
using `lldb-test symbols --dump-ast ...`. It prints `Clang::Decl` which has 
those info. However, it has a bug in NativePDB plugin. It prints the methods 
twice. Maybe we can just check once for each method in the test? 

`lldb-test symbols --find=functions` prints `lldb_private::Function` which 
doesn't have those info (static/virtual). 

So, we can either just use `lldb-test symbols --dump-ast ...` but check only 
once for each method or use `lldb-test symbols --find=functions`.

Both commands just crash without this change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113930

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


[Lldb-commits] [PATCH] D114907: [lldb] Skip two lldb tests on Windows because they are flaky

2021-12-01 Thread Stella Stamenova via Phabricator via lldb-commits
stella.stamenova created this revision.
stella.stamenova requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

These tests work fine with VS2017, but become more flaky with VS2019 and the 
buildbot is about to get upgraded.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114907

Files:
  
lldb/test/API/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
  lldb/test/API/python_api/lldbutil/iter/TestLLDBIterator.py


Index: lldb/test/API/python_api/lldbutil/iter/TestLLDBIterator.py
===
--- lldb/test/API/python_api/lldbutil/iter/TestLLDBIterator.py
+++ lldb/test/API/python_api/lldbutil/iter/TestLLDBIterator.py
@@ -89,6 +89,7 @@
 self.assertEqual(yours[i], mine[i],
 "ID of yours[{0}] and mine[{0}] matches".format(i))
 
+@skipIfWindows # This test is flaky on Windows
 def test_lldb_iter_frame(self):
 """Test iterator works correctly for SBProcess->SBThread->SBFrame."""
 self.build()
Index: 
lldb/test/API/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
===
--- 
lldb/test/API/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
+++ 
lldb/test/API/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
@@ -20,6 +20,7 @@
 # hits break in another thread in testrun
 @add_test_categories(['pyapi'])
 @expectedFlakeyNetBSD
+@skipIfWindows # This test is flaky on Windows
 def test_python(self):
 """Test that we obey thread conditioned breakpoints."""
 self.build()


Index: lldb/test/API/python_api/lldbutil/iter/TestLLDBIterator.py
===
--- lldb/test/API/python_api/lldbutil/iter/TestLLDBIterator.py
+++ lldb/test/API/python_api/lldbutil/iter/TestLLDBIterator.py
@@ -89,6 +89,7 @@
 self.assertEqual(yours[i], mine[i],
 "ID of yours[{0}] and mine[{0}] matches".format(i))
 
+@skipIfWindows # This test is flaky on Windows
 def test_lldb_iter_frame(self):
 """Test iterator works correctly for SBProcess->SBThread->SBFrame."""
 self.build()
Index: lldb/test/API/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
===
--- lldb/test/API/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
+++ lldb/test/API/functionalities/thread/thread_specific_break_plus_condition/TestThreadSpecificBpPlusCondition.py
@@ -20,6 +20,7 @@
 # hits break in another thread in testrun
 @add_test_categories(['pyapi'])
 @expectedFlakeyNetBSD
+@skipIfWindows # This test is flaky on Windows
 def test_python(self):
 """Test that we obey thread conditioned breakpoints."""
 self.build()
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D114911: [lldb] Introduce absolutely minimal FreeBSDKernel plugin

2021-12-01 Thread Michał Górny via Phabricator via lldb-commits
mgorny created this revision.
mgorny added reviewers: labath, emaste, krytarowski.
Herald added a subscriber: arichardson.
mgorny requested review of this revision.

Introduce an absolutely minimal FreeBSDKernel plugin that currently
provides the ability to read memory from FreeBSD vmcores
via libfbsdvmcore.  At this point, it can only handle minidump format
since the "full memory" coredump use ELF container that is taken
by the elf-core plugin instead.


https://reviews.llvm.org/D114911

Files:
  lldb/source/Plugins/Process/CMakeLists.txt
  lldb/source/Plugins/Process/FreeBSDKernel/CMakeLists.txt
  lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp
  lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.h

Index: lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.h
===
--- /dev/null
+++ lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.h
@@ -0,0 +1,58 @@
+//===-- ProcessFreeBSDKernel.h --*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+
+#ifndef LLDB_SOURCE_PLUGINS_PROCESS_FREEBSDKERNEL_PROCESSFREEBSDKERNEL_H
+#define LLDB_SOURCE_PLUGINS_PROCESS_FREEBSDKERNEL_PROCESSFREEBSDKERNEL_H
+
+#include "lldb/Target/PostMortemProcess.h"
+
+class ProcessFreeBSDKernel : public lldb_private::PostMortemProcess {
+public:
+  ProcessFreeBSDKernel(lldb::TargetSP target_sp, lldb::ListenerSP listener,
+   const lldb_private::FileSpec &core_file, void *fvc);
+
+  ~ProcessFreeBSDKernel() override;
+
+  static lldb::ProcessSP
+  CreateInstance(lldb::TargetSP target_sp, lldb::ListenerSP listener,
+ const lldb_private::FileSpec *crash_file_path,
+ bool can_connect);
+
+  static void Initialize();
+
+  static void Terminate();
+
+  static llvm::StringRef GetPluginNameStatic() { return "freebsd-kernel"; }
+
+  static llvm::StringRef GetPluginDescriptionStatic() {
+return "FreeBSD kernel vmcore debugging plug-in.";
+  }
+
+  llvm::StringRef GetPluginName() override { return GetPluginNameStatic(); }
+
+  lldb_private::Status DoDestroy() override;
+
+  bool CanDebug(lldb::TargetSP target_sp,
+bool plugin_specified_by_name) override;
+
+  void RefreshStateAfterStop() override;
+
+  lldb_private::Status DoLoadCore() override;
+
+  size_t DoReadMemory(lldb::addr_t addr, void *buf, size_t size,
+  lldb_private::Status &error) override;
+
+protected:
+  bool DoUpdateThreadList(lldb_private::ThreadList &old_thread_list,
+  lldb_private::ThreadList &new_thread_list) override;
+
+private:
+  void *m_fvc;
+};
+
+#endif // LLDB_SOURCE_PLUGINS_PROCESS_FREEBSDKERNEL_PROCESSFREEBSDKERNEL_H
Index: lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp
===
--- /dev/null
+++ lldb/source/Plugins/Process/FreeBSDKernel/ProcessFreeBSDKernel.cpp
@@ -0,0 +1,86 @@
+//===-- ProcessFreeBSDKernel.cpp --===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===--===//
+
+#include "ProcessFreeBSDKernel.h"
+
+#include "lldb/Core/Module.h"
+#include "lldb/Core/PluginManager.h"
+
+#include 
+
+using namespace lldb;
+using namespace lldb_private;
+
+LLDB_PLUGIN_DEFINE(ProcessFreeBSDKernel)
+
+ProcessFreeBSDKernel::ProcessFreeBSDKernel(lldb::TargetSP target_sp,
+   ListenerSP listener_sp,
+   const FileSpec &core_file, void *fvc)
+: PostMortemProcess(target_sp, listener_sp), m_fvc(fvc) {}
+
+ProcessFreeBSDKernel::~ProcessFreeBSDKernel() {
+  if (m_fvc)
+fvc_close(static_cast(m_fvc));
+}
+
+lldb::ProcessSP ProcessFreeBSDKernel::CreateInstance(lldb::TargetSP target_sp,
+ ListenerSP listener_sp,
+ const FileSpec *crash_file,
+ bool can_connect) {
+  lldb::ProcessSP process_sp;
+  if (crash_file && !can_connect) {
+fvc_t *fvc = fvc_open(
+target_sp->GetExecutableModule()->GetFileSpec().GetPath().c_str(),
+crash_file->GetPath().c_str(), nullptr, nullptr, nullptr);
+if (fvc)
+  process_sp = std::make_shared(
+  target_sp, listener_sp, *crash_file, fvc);
+  }
+  return process_sp;
+}
+
+void ProcessFreeBSDKernel::Initialize() {
+  static llv

[Lldb-commits] [PATCH] D114911: [lldb] Introduce absolutely minimal FreeBSDKernel plugin

2021-12-01 Thread Michał Górny via Phabricator via lldb-commits
mgorny added a comment.

@labath, I'm waiting for your feedback. I suspect you're going to hate it for 
being so incomplete (but then, we don't expect it to be able to do much more 
than this) but also love it for being so simple :-P.


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

https://reviews.llvm.org/D114911

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


[Lldb-commits] [PATCH] D113930: [LLDB][NativePDB] Fix function decl creation for class methods

2021-12-01 Thread Zequan Wu via Phabricator via lldb-commits
zequanwu updated this revision to Diff 391147.
zequanwu added a comment.

Select correct the OneMethodRecord for overloaded method by checking TypeIndex.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113930

Files:
  lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
  lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp

Index: lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp
===
--- lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp
+++ lldb/test/Shell/SymbolFile/NativePDB/find-functions.cpp
@@ -1,7 +1,7 @@
 // clang-format off
 // REQUIRES: lld, x86
 
-// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /Fo%t.obj -- %s
+// RUN: %clang_cl --target=x86_64-windows-msvc -Od -Z7 -c /GR- /Fo%t.obj -- %s
 // RUN: lld-link -debug:full -nodefaultlib -entry:main %t.obj -out:%t.exe -pdb:%t.pdb
 
 // RUN: lldb-test symbols --find=function --name=main --function-flags=full %t.exe \
@@ -13,6 +13,46 @@
 // RUN: lldb-test symbols --find=function --name=varargs_fn --function-flags=full %t.exe \
 // RUN: | FileCheck %s --check-prefix=FIND-VAR
 
+// RUN: lldb-test symbols --find=function --name=Struct::simple_method --function-flags=full %t.exe \
+// RUN: | FileCheck %s --check-prefix=FIND-SIMPLE
+
+// RUN: lldb-test symbols --find=function --name=Struct::virtual_method --function-flags=full %t.exe \
+// RUN: | FileCheck %s --check-prefix=FIND-VIRTUAL
+
+// RUN: lldb-test symbols --find=function --name=Struct::static_method --function-flags=full %t.exe \
+// RUN: | FileCheck %s --check-prefix=FIND-STATIC-METHOD
+
+// RUN: lldb-test symbols --find=function --name=Struct::overloaded_method --function-flags=full %t.exe \
+// RUN: | FileCheck %s --check-prefix=FIND-OVERLOAD
+
+struct Struct {
+  int simple_method() {
+return 1;
+  }
+
+  virtual int virtual_method() {
+return 2;
+  }
+
+  static int static_method() {
+return 3;
+  }
+
+  int overloaded_method() {
+return 4 + overloaded_method('a') + overloaded_method('a', 1);
+  }
+protected:
+  virtual int overloaded_method(char c) {
+return 5;
+  }
+private:
+  static int overloaded_method(char c, int i, ...) {
+return 6;
+  }
+};
+
+Struct s;
+
 static int static_fn() {
   return 42;
 }
@@ -22,7 +62,8 @@
 }
 
 int main(int argc, char **argv) {
-  return static_fn() + varargs_fn(argc, argc);
+  return static_fn() + varargs_fn(argc, argc) + s.simple_method() +
+  Struct::static_method() + s.virtual_method() + s.overloaded_method();
 }
 
 // FIND-MAIN:  Function: id = {{.*}}, name = "main"
@@ -33,3 +74,17 @@
 
 // FIND-VAR:  Function: id = {{.*}}, name = "{{.*}}varargs_fn{{.*}}"
 // FIND-VAR-NEXT: FuncType: id = {{.*}}, compiler_type = "int (int, int, ...)"
+
+// FIND-SIMPLE:  Function: id = {{.*}}, name = "{{.*}}Struct::simple_method{{.*}}"
+// FIND-SIMPLE-NEXT: FuncType: id = {{.*}}, compiler_type = "int (void)"
+
+// FIND-VIRTUAL:  Function: id = {{.*}}, name = "{{.*}}Struct::virtual_method{{.*}}"
+// FIND-VIRTUAL-NEXT: FuncType: id = {{.*}}, compiler_type = "int (void)"
+
+// FIND-STATIC-METHOD:  Function: id = {{.*}}, name = "{{.*}}Struct::static_method{{.*}}"
+// FIND-STATIC-METHOD-NEXT: FuncType: id = {{.*}}, compiler_type = "int (void)"
+
+// FIND-OVERLOAD: Function: id = {{.*}}, name = "{{.*}}Struct::overloaded_method{{.*}}"
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (void)"
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char)"
+// FIND-OVERLOAD: FuncType: id = {{.*}}, compiler_type = "int (char, int, ...)"
Index: lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
===
--- lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
+++ lldb/source/Plugins/SymbolFile/NativePDB/PdbAstBuilder.cpp
@@ -30,6 +30,70 @@
 using namespace llvm::codeview;
 using namespace llvm::pdb;
 
+namespace {
+struct CreateMethodDecl : public TypeVisitorCallbacks {
+  CreateMethodDecl(PdbIndex &m_index, TypeSystemClang &m_clang,
+   TypeIndex func_type_index,
+   clang::FunctionDecl *&function_decl,
+   lldb::opaque_compiler_type_t parent_ty,
+   llvm::StringRef proc_name, CompilerType func_ct)
+  : m_index(m_index), m_clang(m_clang), func_type_index(func_type_index),
+function_decl(function_decl), parent_ty(parent_ty),
+proc_name(proc_name), func_ct(func_ct) {}
+  PdbIndex &m_index;
+  TypeSystemClang &m_clang;
+  TypeIndex func_type_index;
+  clang::FunctionDecl *&function_decl;
+  lldb::opaque_compiler_type_t parent_ty;
+  llvm::StringRef proc_name;
+  CompilerType func_ct;
+
+  llvm::Error visitKnownMember(CVMemberRecord &cvr,
+   OverloadedMethodRecord &overloaded) override {
+TypeIndex method_list_idx = overloaded.MethodList

[Lldb-commits] [PATCH] D114819: [lldb] Split TestCxxChar8_t

2021-12-01 Thread Jim Ingham via Phabricator via lldb-commits
jingham requested changes to this revision.
jingham added a comment.
This revision now requires changes to proceed.

Seems fine to me to break this into running and not running cases, but you 
should use the right lldbutil method for the running case.




Comment at: lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py:40-43
+lldbutil.run_to_breakpoint_make_target(self)
+
 lldbutil.run_break_set_by_source_regexp(self, "// break here", "-f 
main.cpp")
 self.runCmd("run")

You don't need to do this in three steps, do you?  Can't you just use 
lldbutil.run_to_source_breakpoint?  That will catch errors in running & hitting 
the breakpoint which you don't check here.


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

https://reviews.llvm.org/D114819

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


[Lldb-commits] [PATCH] D114819: [lldb] Split TestCxxChar8_t

2021-12-01 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere marked an inline comment as done.
JDevlieghere added inline comments.



Comment at: lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py:40-43
+lldbutil.run_to_breakpoint_make_target(self)
+
 lldbutil.run_break_set_by_source_regexp(self, "// break here", "-f 
main.cpp")
 self.runCmd("run")

jingham wrote:
> You don't need to do this in three steps, do you?  Can't you just use 
> lldbutil.run_to_source_breakpoint?  That will catch errors in running & 
> hitting the breakpoint which you don't check here.
Yes, that would work here, but not for the test above. I'll update the patch. 


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

https://reviews.llvm.org/D114819

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


[Lldb-commits] [PATCH] D114819: [lldb] Split TestCxxChar8_t

2021-12-01 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere updated this revision to Diff 391168.
JDevlieghere marked an inline comment as done.
JDevlieghere added a comment.

Address Jim's comment


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

https://reviews.llvm.org/D114819

Files:
  lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py


Index: lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
===
--- lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
+++ lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
@@ -15,13 +15,12 @@
 mydir = TestBase.compute_mydir(__file__)
 
 @skipIf(compiler="clang", compiler_version=['<', '7.0'])
-def test(self):
-"""Test that C++ supports char8_t correctly."""
+@expectedFailureDarwin(archs=["arm64", "arm64e"]) # 

+def test_without_process(self):
+"""Test that C++ supports char8_t without a running process."""
 self.build()
-
 lldbutil.run_to_breakpoint_make_target(self)
 
-# Make sure the variables can be printed without a running process.
 self.expect("target variable a", substrs=["char8_t", "0x61 u8'a'"])
 self.expect("target variable ab",
 substrs=["const char8_t *", 'u8"你好"'])
@@ -29,11 +28,16 @@
 
 self.expect_expr("a", result_type="char8_t", result_summary="0x61 
u8'a'")
 self.expect_expr("ab", result_type="const char8_t *", 
result_summary='u8"你好"')
+
 # FIXME: This should work too.
 self.expect("expr abc", substrs=['u8"你好"'], matching=False)
 
-lldbutil.run_break_set_by_source_regexp(self, "// break here", "-f 
main.cpp")
-self.runCmd("run")
+
+@skipIf(compiler="clang", compiler_version=['<', '7.0'])
+def test_with_process(self):
+"""Test that C++ supports char8_t with a running process."""
+self.build()
+lldbutil.run_to_source_breakpoint(self, '// break here', 
lldb.SBFileSpec("main.cpp"))
 
 # As well as with it
 self.expect_expr("a", result_type="char8_t", result_summary="0x61 
u8'a'")


Index: lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
===
--- lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
+++ lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
@@ -15,13 +15,12 @@
 mydir = TestBase.compute_mydir(__file__)
 
 @skipIf(compiler="clang", compiler_version=['<', '7.0'])
-def test(self):
-"""Test that C++ supports char8_t correctly."""
+@expectedFailureDarwin(archs=["arm64", "arm64e"]) # 
+def test_without_process(self):
+"""Test that C++ supports char8_t without a running process."""
 self.build()
-
 lldbutil.run_to_breakpoint_make_target(self)
 
-# Make sure the variables can be printed without a running process.
 self.expect("target variable a", substrs=["char8_t", "0x61 u8'a'"])
 self.expect("target variable ab",
 substrs=["const char8_t *", 'u8"你好"'])
@@ -29,11 +28,16 @@
 
 self.expect_expr("a", result_type="char8_t", result_summary="0x61 u8'a'")
 self.expect_expr("ab", result_type="const char8_t *", result_summary='u8"你好"')
+
 # FIXME: This should work too.
 self.expect("expr abc", substrs=['u8"你好"'], matching=False)
 
-lldbutil.run_break_set_by_source_regexp(self, "// break here", "-f main.cpp")
-self.runCmd("run")
+
+@skipIf(compiler="clang", compiler_version=['<', '7.0'])
+def test_with_process(self):
+"""Test that C++ supports char8_t with a running process."""
+self.build()
+lldbutil.run_to_source_breakpoint(self, '// break here', lldb.SBFileSpec("main.cpp"))
 
 # As well as with it
 self.expect_expr("a", result_type="char8_t", result_summary="0x61 u8'a'")
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D114819: [lldb] Split TestCxxChar8_t

2021-12-01 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


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

https://reviews.llvm.org/D114819

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


[Lldb-commits] [lldb] 8f329ce - [lldb] Split TestCxxChar8_t

2021-12-01 Thread Jonas Devlieghere via lldb-commits

Author: Jonas Devlieghere
Date: 2021-12-01T16:58:43-08:00
New Revision: 8f329cee423735c2767d3ba490e39db49f649c21

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

LOG: [lldb] Split TestCxxChar8_t

Split TestCxxChar8_t into two parts: one that check reading variables
without a process and another part with. This allows us to skip the
former on Apple Silicon, where lack of support for chained fix-ups
causes the test to fail.

Differential revision: https://reviews.llvm.org/D114819

Added: 


Modified: 
lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py

Removed: 




diff  --git a/lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py 
b/lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
index b069afc1bbf7d..71dfdbc6e66bd 100644
--- a/lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
+++ b/lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
@@ -15,13 +15,12 @@ class CxxChar8_tTestCase(TestBase):
 mydir = TestBase.compute_mydir(__file__)
 
 @skipIf(compiler="clang", compiler_version=['<', '7.0'])
-def test(self):
-"""Test that C++ supports char8_t correctly."""
+@expectedFailureDarwin(archs=["arm64", "arm64e"]) # 

+def test_without_process(self):
+"""Test that C++ supports char8_t without a running process."""
 self.build()
-
 lldbutil.run_to_breakpoint_make_target(self)
 
-# Make sure the variables can be printed without a running process.
 self.expect("target variable a", substrs=["char8_t", "0x61 u8'a'"])
 self.expect("target variable ab",
 substrs=["const char8_t *", 'u8"你好"'])
@@ -29,11 +28,16 @@ def test(self):
 
 self.expect_expr("a", result_type="char8_t", result_summary="0x61 
u8'a'")
 self.expect_expr("ab", result_type="const char8_t *", 
result_summary='u8"你好"')
+
 # FIXME: This should work too.
 self.expect("expr abc", substrs=['u8"你好"'], matching=False)
 
-lldbutil.run_break_set_by_source_regexp(self, "// break here", "-f 
main.cpp")
-self.runCmd("run")
+
+@skipIf(compiler="clang", compiler_version=['<', '7.0'])
+def test_with_process(self):
+"""Test that C++ supports char8_t with a running process."""
+self.build()
+lldbutil.run_to_source_breakpoint(self, '// break here', 
lldb.SBFileSpec("main.cpp"))
 
 # As well as with it
 self.expect_expr("a", result_type="char8_t", result_summary="0x61 
u8'a'")



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


[Lldb-commits] [PATCH] D114819: [lldb] Split TestCxxChar8_t

2021-12-01 Thread Jonas Devlieghere via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8f329cee4237: [lldb] Split TestCxxChar8_t (authored by 
JDevlieghere).
Herald added a project: LLDB.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114819

Files:
  lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py


Index: lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
===
--- lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
+++ lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
@@ -15,13 +15,12 @@
 mydir = TestBase.compute_mydir(__file__)
 
 @skipIf(compiler="clang", compiler_version=['<', '7.0'])
-def test(self):
-"""Test that C++ supports char8_t correctly."""
+@expectedFailureDarwin(archs=["arm64", "arm64e"]) # 

+def test_without_process(self):
+"""Test that C++ supports char8_t without a running process."""
 self.build()
-
 lldbutil.run_to_breakpoint_make_target(self)
 
-# Make sure the variables can be printed without a running process.
 self.expect("target variable a", substrs=["char8_t", "0x61 u8'a'"])
 self.expect("target variable ab",
 substrs=["const char8_t *", 'u8"你好"'])
@@ -29,11 +28,16 @@
 
 self.expect_expr("a", result_type="char8_t", result_summary="0x61 
u8'a'")
 self.expect_expr("ab", result_type="const char8_t *", 
result_summary='u8"你好"')
+
 # FIXME: This should work too.
 self.expect("expr abc", substrs=['u8"你好"'], matching=False)
 
-lldbutil.run_break_set_by_source_regexp(self, "// break here", "-f 
main.cpp")
-self.runCmd("run")
+
+@skipIf(compiler="clang", compiler_version=['<', '7.0'])
+def test_with_process(self):
+"""Test that C++ supports char8_t with a running process."""
+self.build()
+lldbutil.run_to_source_breakpoint(self, '// break here', 
lldb.SBFileSpec("main.cpp"))
 
 # As well as with it
 self.expect_expr("a", result_type="char8_t", result_summary="0x61 
u8'a'")


Index: lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
===
--- lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
+++ lldb/test/API/lang/cpp/char8_t/TestCxxChar8_t.py
@@ -15,13 +15,12 @@
 mydir = TestBase.compute_mydir(__file__)
 
 @skipIf(compiler="clang", compiler_version=['<', '7.0'])
-def test(self):
-"""Test that C++ supports char8_t correctly."""
+@expectedFailureDarwin(archs=["arm64", "arm64e"]) # 
+def test_without_process(self):
+"""Test that C++ supports char8_t without a running process."""
 self.build()
-
 lldbutil.run_to_breakpoint_make_target(self)
 
-# Make sure the variables can be printed without a running process.
 self.expect("target variable a", substrs=["char8_t", "0x61 u8'a'"])
 self.expect("target variable ab",
 substrs=["const char8_t *", 'u8"你好"'])
@@ -29,11 +28,16 @@
 
 self.expect_expr("a", result_type="char8_t", result_summary="0x61 u8'a'")
 self.expect_expr("ab", result_type="const char8_t *", result_summary='u8"你好"')
+
 # FIXME: This should work too.
 self.expect("expr abc", substrs=['u8"你好"'], matching=False)
 
-lldbutil.run_break_set_by_source_regexp(self, "// break here", "-f main.cpp")
-self.runCmd("run")
+
+@skipIf(compiler="clang", compiler_version=['<', '7.0'])
+def test_with_process(self):
+"""Test that C++ supports char8_t with a running process."""
+self.build()
+lldbutil.run_to_source_breakpoint(self, '// break here', lldb.SBFileSpec("main.cpp"))
 
 # As well as with it
 self.expect_expr("a", result_type="char8_t", result_summary="0x61 u8'a'")
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D114923: [lldb/plugins] Add arm64(e) support to ScriptedProcess

2021-12-01 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib created this revision.
mib added reviewers: JDevlieghere, jasonmolenda.
mib added a project: LLDB.
Herald added subscribers: omjavaid, kristof.beyls.
mib requested review of this revision.
Herald added a subscriber: lldb-commits.

This patch adds support for arm64(e) targets to ScriptedProcess, by
providing the `DynamicRegisterInfo` to the base `lldb.ScriptedThread` class.

This allows create and debugging ScriptedProcess on Apple Silicon
hardware as well as Apple mobile devices.

The patch also re-enables TestScriptedProcess for arm64 Darwin platforms.

rdar://85892451

Signed-off-by: Med Ismail Bennani 


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114923

Files:
  lldb/examples/python/scripted_process/scripted_process.py
  lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py


Index: lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
===
--- lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
+++ lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
@@ -103,7 +103,6 @@
 
 @skipUnlessDarwin
 @skipIfOutOfTreeDebugserver
-@skipIf(archs=no_match(['x86_64']))
 def test_launch_scripted_process_stack_frames(self):
 """Test that we can launch an lldb scripted process from the command
 line, check its process ID and read string from memory."""
Index: lldb/examples/python/scripted_process/scripted_process.py
===
--- lldb/examples/python/scripted_process/scripted_process.py
+++ lldb/examples/python/scripted_process/scripted_process.py
@@ -318,6 +318,44 @@
 {'name': 'fs', 'bitsize': 64, 'offset': 152, 
'encoding': 'uint', 'format': 'hex', 'set': 0},
 {'name': 'gs', 'bitsize': 64, 'offset': 160, 
'encoding': 'uint', 'format': 'hex', 'set': 0},
 ]
+elif 'arm64' in arch:
+self.register_info['sets'] = ['General Purpose Registers']
+self.register_info['registers'] = [
+{'name': 'x0',   'bitsize': 64, 'offset': 0,   
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 0,  'dwarf': 0,  
'generic': 'arg0', 'alt-name': 'arg0', },
+{'name': 'x1',   'bitsize': 64, 'offset': 8,   
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 1,  'dwarf': 1,  
'generic': 'arg1', 'alt-name': 'arg1', },
+{'name': 'x2',   'bitsize': 64, 'offset': 16,  
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 2,  'dwarf': 2,  
'generic': 'arg2', 'alt-name': 'arg2', },
+{'name': 'x3',   'bitsize': 64, 'offset': 24,  
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 3,  'dwarf': 3,  
'generic': 'arg3', 'alt-name': 'arg3', },
+{'name': 'x4',   'bitsize': 64, 'offset': 32,  
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 4,  'dwarf': 4,  
'generic': 'arg4', 'alt-name': 'arg4', },
+{'name': 'x5',   'bitsize': 64, 'offset': 40,  
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 5,  'dwarf': 5,  
'generic': 'arg5', 'alt-name': 'arg5', },
+{'name': 'x6',   'bitsize': 64, 'offset': 48,  
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 6,  'dwarf': 6,  
'generic': 'arg6', 'alt-name': 'arg6', },
+{'name': 'x7',   'bitsize': 64, 'offset': 56,  
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 7,  'dwarf': 7,  
'generic': 'arg7', 'alt-name': 'arg7', },
+{'name': 'x8',   'bitsize': 64, 'offset': 64,  
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 8,  'dwarf': 8,  },
+{'name': 'x9',   'bitsize': 64, 'offset': 72,  
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 9,  'dwarf': 9,  },
+{'name': 'x10',  'bitsize': 64, 'offset': 80,  
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 10, 'dwarf': 10, },
+{'name': 'x11',  'bitsize': 64, 'offset': 88,  
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 11, 'dwarf': 11, },
+{'name': 'x12',  'bitsize': 64, 'offset': 96,  
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 12, 'dwarf': 12, },
+{'name': 'x13',  'bitsize': 64, 'offset': 104, 
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 13, 'dwarf': 13, },
+{'name': 'x14',  'bitsize': 64, 'offset': 112, 
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 14, 'dwarf': 14, },
+{'name': 'x15',  'bitsize': 64, 'offset': 120, 
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 15, 'dwarf': 15, },
+{'name': 'x16',  'bitsize': 64, 'offset': 128, 
'encoding': 'uint', 'format': 'hex', 'set': 0, 'gcc': 16, 'dwarf': 16, },
+   

[Lldb-commits] [lldb] 8176768 - [lldb] Fix DYLD_INSERT_LIBRARIES on AS

2021-12-01 Thread Jonas Devlieghere via lldb-commits

Author: Jonas Devlieghere
Date: 2021-12-01T20:03:05-08:00
New Revision: 8176768b46b7839a8495d58341198dffad11bc14

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

LOG: [lldb] Fix DYLD_INSERT_LIBRARIES on AS

Don't make DYLD_INSERT_LIBRARIES conditional on the host triple
containing x86.

Added: 


Modified: 
lldb/test/API/lit.cfg.py

Removed: 




diff  --git a/lldb/test/API/lit.cfg.py b/lldb/test/API/lit.cfg.py
index 44d5028717b28..a7a9e4554b177 100644
--- a/lldb/test/API/lit.cfg.py
+++ b/lldb/test/API/lit.cfg.py
@@ -104,12 +104,12 @@ def delete_module_cache(path):
 if is_configured('llvm_use_sanitizer'):
   if 'Address' in config.llvm_use_sanitizer:
 config.environment['ASAN_OPTIONS'] = 'detect_stack_use_after_return=1'
-if 'Darwin' in config.host_os and 'x86' in config.host_triple:
+if 'Darwin' in config.host_os:
   config.environment['DYLD_INSERT_LIBRARIES'] = find_sanitizer_runtime(
   'libclang_rt.asan_osx_dynamic.dylib')
 
   if 'Thread' in config.llvm_use_sanitizer:
-if 'Darwin' in config.host_os and 'x86' in config.host_triple:
+if 'Darwin' in config.host_os:
   config.environment['DYLD_INSERT_LIBRARIES'] = find_sanitizer_runtime(
   'libclang_rt.tsan_osx_dynamic.dylib')
 



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


[Lldb-commits] [PATCH] D114791: [lldb] Clarify StructuredDataImpl ownership

2021-12-01 Thread Med Ismail Bennani via Phabricator via lldb-commits
mib accepted this revision.
mib added a comment.
This revision is now accepted and ready to land.

LGTM with some minor nits.




Comment at: lldb/bindings/lua/lua-wrapper.swig:31
lldb::BreakpointLocationSP bp_loc_sp,
StructuredDataImpl *extra_args_impl
 )

May be we should keep consistency with the `python-wrapper.swig` definition ?



Comment at: lldb/source/API/SBThreadPlan.cpp:72-73
   if (thread)
-m_opaque_wp =
-std::make_shared(*thread, class_name, nullptr);
+m_opaque_wp = std::make_shared(*thread, class_name,
+ StructuredDataImpl());
 }

labath wrote:
> I haven't been able to figure out how/if this works. As far as I can tell, 
> this object will get destroyed immediately after construction due to lack of 
> any shared_ptrs pointing to it.
I agree in this case, m_opaque should be either a UP or SP but not a week_ptr.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114791

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


[Lldb-commits] [lldb] fcd2d85 - [lldb] Skip test_launch_scripted_process_stack_frames with ASan

2021-12-01 Thread Jonas Devlieghere via lldb-commits

Author: Jonas Devlieghere
Date: 2021-12-01T21:35:00-08:00
New Revision: fcd2d85cc9438ffe8e4a4948898077dfc253fe9d

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

LOG: [lldb] Skip test_launch_scripted_process_stack_frames with ASan

This test is failing on the sanitized bot because of a
heap-use-after-free. Disabling the test to turn the bot
green again.

rdar://85954489.

Added: 


Modified: 
lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py

Removed: 




diff  --git 
a/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py 
b/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
index 342068328310a..9df72cdda1901 100644
--- a/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
+++ b/lldb/test/API/functionalities/scripted_process/TestScriptedProcess.py
@@ -104,6 +104,7 @@ def create_stack_skinny_corefile(self, file):
 @skipUnlessDarwin
 @skipIfOutOfTreeDebugserver
 @skipIf(archs=no_match(['x86_64']))
+@skipIfAsan # rdar://85954489
 def test_launch_scripted_process_stack_frames(self):
 """Test that we can launch an lldb scripted process from the command
 line, check its process ID and read string from memory."""



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