[Lldb-commits] [lldb] [lldb-dap][test] Fix DAP disassemble test (PR #142129)
Ebuka Ezike via lldb-commits
lldb-commits at lists.llvm.org
Mon Jun 2 01:40:42 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;
----------------
da-viper wrote:
The instructions returned should be same with or without breakpoints, I updated the comment to clarify it.
https://github.com/llvm/llvm-project/pull/142129
More information about the lldb-commits
mailing list