[PATCH] D63468: llvm-symbolizer: Add a FRAME command.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 21 15:40:42 PDT 2019
eugenis added a comment.
More ideas for tests: multi dimensional arrays, two levels of inlining, lexical scopes.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:987
+ case DW_TAG_ptr_to_member_type:
+ return 2 * PointerSize;
+ case DW_TAG_const_type:
----------------
I'm not very familiar with this: is that true for all targets?
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:1006
+ if (Child.getTag() != DW_TAG_subrange_type)
+ continue;
+
----------------
I think this is not correct for multi-dimensional arrays.
This is a int [10][20] array:
0x00000053: DW_TAG_array_type
DW_AT_type (0x00000065 "int")
0x00000058: DW_TAG_subrange_type
DW_AT_type (0x0000006c "__ARRAY_SIZE_TYPE__")
DW_AT_count (0x0a)
0x0000005e: DW_TAG_subrange_type
DW_AT_type (0x0000006c "__ARRAY_SIZE_TYPE__")
DW_AT_count (0x14)
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFContext.cpp:1014
+ if (Optional<uint64_t> UpperBound =
+ UpperBoundAttr->getAsUnsignedConstant())
+ return (*UpperBound + 1) * *BaseSize;
----------------
Do you want to look at lower bound, too?
================
Comment at: llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp:144
+ else
+ OS << "??\n";
+ return *this;
----------------
Should we simply not print anything when tag offset is missing? It's completely optional, after all. It's a bit confusing to see "??" in the output for normal (non-hwasan) binary and makes me think that some debug info got lost or stripped.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63468/new/
https://reviews.llvm.org/D63468
More information about the llvm-commits
mailing list