[Lldb-commits] [lldb] [lldb]Make `list` command work with headers when possible. (PR #139002)

Vy Nguyen via lldb-commits lldb-commits at lists.llvm.org
Mon May 12 08:21:48 PDT 2025


oontvoo wrote:


> When setting a breakpoint, we pass eSymbolContextLineEntry to the function so that it returns a line entry matching the query. In this case, we're not really interested in the entire line entry, but I think it should be possible the line entry as a carrier for the file name: we ask for the function to fill it out, and then fetch the file from there. Can you see if that works?

Yes - that worked! Thanks!


> I also think that changing `0` to `start_line` was not right change. Since we're not actually line entry (just the file name, we'll extract the lines ourselves), we want to maximize our chances of finding a matching line entry. If it cannot find an exact file+line match, `ResolveSymbolContextForFilePath` will return a line entry for any line that comes after it. Using zero ensures we don't skip any line entries.

Leaving the line-number as `0` somehow result in it couldn't find the file! (Changing it to the right line number - or anything non-zero, on the other hand works). Any idea why?





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


More information about the lldb-commits mailing list