This patch implements the dwarfdump option --find=<name>.
This option looks for a DIE in the accelerator tables and dumps it if found.
This initial patch only adds support for .apple_names to keep the review small, adding the other sections and pubnames support should be trivial though.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
include/llvm/DebugInfo/DWARF/DWARFContext.h | ||
---|---|---|
242 ↗ | (On Diff #116682) | s/pointer/reference/ |
lib/DebugInfo/DWARF/DWARFAcceleratorTable.cpp | ||
198 ↗ | (On Diff #116682) | Why not Offset? |
241 ↗ | (On Diff #116682) | Not clang-formatted? |
tools/llvm-dwarfdump/llvm-dwarfdump.cpp | ||
254 ↗ | (On Diff #116682) | Would it be worthwhile to stop iterating once found? |
include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h | ||
---|---|---|
23 ↗ | (On Diff #116837) | Forward declaration is redundant with the above #include. |
test/tools/llvm-dwarfdump/X86/find.test | ||
11 ↗ | (On Diff #116837) | Maybe another CHECK-NOT to prove the name is associated with this subprogram? Might be overkill but we usually do something like that. Similarly for the MULTI cases below. |
include/llvm/DebugInfo/DWARF/DWARFAcceleratorTable.h | ||
---|---|---|
69 ↗ | (On Diff #116897) | default? |
71 ↗ | (On Diff #116897) | Should this be const /ref/ return? (or non-const value, though iterators that return by value are problematic) & what about operator->? Should this class use one of the iterator facade helpers from llvm/ADT/iterator.h? |
76 ↗ | (On Diff #116897) | Prefer direct init over copy init: X y = z; rather than: X y(z); where possible. |