[Lldb-commits] [lldb] [lldb-dap] Fix source references (PR #144364)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 17 09:39:18 PDT 2025


https://github.com/JDevlieghere commented:

I looked at the code some more and it seems like we return the address of the symbol if there is one, and only use the actual address (i.e. the pc) when there is none. I was trying to find the code that computes the line in that case (i.e. `pc - symbol`) and I couldn't immediately find it. 

I think this PR is fine in the sense that it improves the status quo, but we probably want to take a more wholistic approach at this problem at some point. For example, if we don't have a symbol, it would be nice to have a source reference for a given range (say the next 64 or 128 instructions) and then as we step keep using that sourceReference but bump the "relative line number" in that artificial source file.

https://github.com/llvm/llvm-project/pull/144364


More information about the lldb-commits mailing list