[PATCH] D89845: Add the ability to extract the unwind rows from DWARF Call Frame Information.
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 14 21:49:39 PST 2020
MaskRay added a subscriber: grimar.
MaskRay added a comment.
`UnwindTable::parseRows` duplicates a fair amount of parsing which has already been implemented by `CFIProgramm::parse: is there possible to deduplicate?
Adding @grimar who touched the code last time.
================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:29
+static constexpr uint32_t INVALID_REGNUM = UINT32_MAX;
+
----------------
`static` is redundant. namespace-scope const/constexpr variables automatically have internal linkage.
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:142
+ case DWARFExpr:
+ return *Expr == *RHS.Expr;
+ case Constant:
----------------
DW_CFA_expression and DW_CFA_val_expression have different `Dereference`
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:190
+ unsigned IndentLevel) const {
+ for (const auto &Row : Rows)
+ Row.dump(OS, MRI, IsEH, IndentLevel);
----------------
auto -> UnwindRow
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:207
+ if (Cie == nullptr)
+ return createStringError(errc::illegal_byte_sequence,
+ "unable to get CIE for FDE at offset 0x%" PRIx64,
----------------
The description of illegal_byte_sequence (EILSEQ) is: Invalid or incomplete multibyte or wide character. It is about an encoding problem. Probably just use errc::invalid_argument
================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:508
+ // location is preceded by a segment selector of the given length
+ auto NewAddress = Inst.getOperandAsUnsigned(CFIP, 0);
+ if (!NewAddress)
----------------
This needs to consider the pointer encoding in FDE.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89845/new/
https://reviews.llvm.org/D89845
More information about the llvm-commits
mailing list