[Lldb-commits] [lldb] [lldb][DWARF] Sort ranges list in dwarf 5. (PR #91343)
Zequan Wu via lldb-commits
lldb-commits at lists.llvm.org
Tue May 7 11:22:23 PDT 2024
ZequanWu wrote:
> > For example: https://github.com/llvm/llvm-project/blob/main/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp#L922-L927. When parsing function info, it validates low and hi address of the function: `GetMinRangeBase` returns the first range entry base and `GetMaxRangeEnd` returns the last range end. If low >= hi, it stops parsing this function.
> > This causes missing inline stack frames for us when debugging a core dump.
>
> Gotcha, makes sense. Since you know how this fails, could you add a test to make sure that scenario continues working?
Yeah, I updated the test `lldb/test/Shell/SymbolFile/DWARF/x86/debug_rnglists.s` so that two ranges in `.debug_rnglists` are out of order and `image lookup -v -s lookup_rnglists` is still able to produce sorted ranges for the inner block:
Without this change:
```
Blocks: id = {0x00000030}, range = [0x00000000-0x00000004)
Symbol: id = {0x00000003}, range = [0x0000000000000001-0x0000000000000004), name="lookup_rnglists"
```
With this change:
```
Blocks: id = {0x00000030}, range = [0x00000000-0x00000004)
id = {0x00000046}, ranges = [0x00000001-0x00000002)[0x00000003-0x00000004)
Symbol: id = {0x00000003}, range = [0x0000000000000001-0x0000000000000004), name="lookup_rnglists"
```
https://github.com/llvm/llvm-project/pull/91343
More information about the lldb-commits
mailing list