Skip to content

[lldb-dap] Fix address comparison in DisassembleRequestHandler #140975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

eronnen
Copy link
Contributor

@eronnen eronnen commented May 22, 2025

Fix comparisons between addresses with the same load address that can unexpectedly return false in DisassembleRequestHandler

@eronnen eronnen requested a review from JDevlieghere as a code owner May 22, 2025 00:44
@llvmbot llvmbot added the lldb label May 22, 2025
@llvmbot
Copy link
Member

llvmbot commented May 22, 2025

@llvm/pr-subscribers-lldb

Author: Ely Ronnen (eronnen)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/140975.diff

1 Files Affected:

  • (modified) lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py (+1)
diff --git a/lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py b/lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py
index a8b51864d118b..1e2a32cb693fc 100644
--- a/lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py
+++ b/lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py
@@ -20,6 +20,7 @@ def test_disassemble(self):
         program = self.getBuildArtifact("a.out")
         self.build_and_launch(program)
         source = "main.c"
+        self.source_path = os.path.join(os.getcwd(), source)
         self.set_source_breakpoints(source, [line_number(source, "// breakpoint 1")])
         self.continue_to_next_stop()
 

@medismailben
Copy link
Member

That doesn't solve the issue:

  File "/Users/mib/Developer/open-source/llvm.org/lldb/test/API/tools/lldb-dap/disassemble/TestDAP_disassemble.py", line 28, in test_disassemble
    self.assertIn("location", pc_assembly, "Source location missing.")
AssertionError: 'location' not found in {'address': '0x100000554', 'instruction': '    ldr w8, [sp, #0x4]', 'instructionBytes': 'e8 07 40 b9'} : Source location missing.

@eronnen eronnen changed the title [lldb-dap] attempt to fix test_disassemble [lldb-dap] Fix address comparison in DisassembleRequestHandler May 22, 2025
@eronnen eronnen requested a review from ashgti May 22, 2025 20:45
@eronnen
Copy link
Contributor Author

eronnen commented May 22, 2025

@medismailben I tested locally and now the test should be fixed

Copy link

github-actions bot commented May 22, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

@eronnen eronnen merged commit 35c15e4 into llvm:main May 23, 2025
10 checks passed
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
…140975)

Fix comparisons between addresses with the same load address that can
unexpectedly return false in `DisassembleRequestHandler`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants