[all-commits] [llvm/llvm-project] fdede9: [lldb][DWARF] Sort ranges list in dwarf 5. (#91343)
Zequan Wu via All-commits
all-commits at lists.llvm.org
Thu May 9 07:43:14 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fdede92d435068f31e7ea3a1dddb46d50343dd8c
https://github.com/llvm/llvm-project/commit/fdede92d435068f31e7ea3a1dddb46d50343dd8c
Author: Zequan Wu <zequanwu at google.com>
Date: 2024-05-09 (Thu, 09 May 2024)
Changed paths:
M lldb/source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
M lldb/test/Shell/SymbolFile/DWARF/x86/debug_rnglists.s
Log Message:
-----------
[lldb][DWARF] Sort ranges list in dwarf 5. (#91343)
Dwarf 5 says "There is no requirement that the entries be ordered in any
particular way" in 2.17.3 Non-Contiguous Address Ranges for rnglist.
Some places assume the ranges are already sorted but it's not.
For example, when [parsing function
info](https://github.com/llvm/llvm-project/blob/bc8a42762057d7036f6871211e62b1c3efb2738a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp#L922-L927),
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 those functions.
This change fixes it and updates 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.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list