[PATCH] D75485: Support DW_FORM_strx* in llvm-dwp.
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 9 22:38:42 PDT 2020
ikudrin added inline comments.
================
Comment at: llvm/tools/llvm-dwp/llvm-dwp.cpp:71
+ uint64_t Length = StrOffsetsData.getU32(&Offset);
+ if (Length == 0xffffffffU)
+ return 16; // unit length: 12 bytes, version: 2 bytes, padding: 2 bytes.
----------------
There is a named constant for that: `DW_LENGTH_DWARF64`.
================
Comment at: llvm/tools/llvm-dwp/llvm-dwp.cpp:108
+// Parse and return the header of the compile unit.
+CompileUnitHeader ParseCompileUnitHeader(StringRef Info) {
+ CompileUnitHeader Header;
----------------
- The function should be `static`.
- The function should check if `Info` has enough data in it for the full header.
================
Comment at: llvm/tools/llvm-dwp/llvm-dwp.cpp:112
+ uint64_t Offset = 0;
+ Header.Length = InfoData.getU32(&Offset);
+ // If the length is 0xffffffff, then this indictes that this is a DWARF 64
----------------
Please, Consider using `DWARFDataExtractor::getInitialLength()` here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75485/new/
https://reviews.llvm.org/D75485
More information about the llvm-commits
mailing list