[Lldb-commits] [lldb] [lldb-dap][test] Fix DAP disassemble test (PR #142129)
Ely Ronnen via lldb-commits
lldb-commits at lists.llvm.org
Fri May 30 15:56:27 PDT 2025
================
@@ -23,15 +19,23 @@ def test_disassemble(self):
self.set_source_breakpoints(source, [line_number(source, "// breakpoint 1")])
self.continue_to_next_stop()
- _, pc_assembly = self.disassemble(frameIndex=0)
- self.assertIn("location", pc_assembly, "Source location missing.")
- self.assertIn("instruction", pc_assembly, "Assembly instruction missing.")
+ insts_with_bp, pc_with_bp_assembly = self.disassemble(frameIndex=0)
+ no_bp = self.set_source_breakpoints(source, [])
+ self.assertEqual(len(no_bp), 0, "expect no breakpoints.")
+ self.assertIn(
+ "instruction", pc_with_bp_assembly, "Assembly instruction missing."
+ )
- # The calling frame (qsort) is coming from a system library, as a result
- # we should not have a source location.
- _, qsort_assembly = self.disassemble(frameIndex=1)
- self.assertNotIn("location", qsort_assembly, "Source location not expected.")
- self.assertIn("instruction", pc_assembly, "Assembly instruction missing.")
+ # the disassembly instructions should be the same even if there is a breakpoint;
----------------
eronnen wrote:
Not sure I understand this comment, because earlier there is `self.assertEqual(len(no_bp), 0, "expect no breakpoints.")` so at this point there is no breakpoint set
https://github.com/llvm/llvm-project/pull/142129
More information about the lldb-commits
mailing list