[PATCH] D89845: Add the ability to extract the unwind rows from DWARF Call Frame Information.

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 6 16:36:59 PST 2021


clayborg added a comment.

The really confusing thing is the error message for x64 debian > LLVM-Unit.DebugInfo/DWARF/_/DebugInfoDWARFTests::DWARFDebugFrame.UnwindTable_DW_CFA_expression:

  /mnt/disks/ssd0/agent/llvm-project/llvm/unittests/DebugInfo/DWARF/DWARFDebugFrameTest.cpp:1318: Failure
        Expected: Rows[0].getRegisterLocations()
        Which is: reg13=[<decoding error> 00]
  To be equal to: VerifyLocs
        Which is: reg13=[DW_OP_reg10]

The FDE tries to parse:

  parseCFI(TestFDE, {dwarf::DW_CFA_expression, Reg, 1, dwarf::DW_OP_reg12}),

Where this clearly encodes DW_CFA_expression (first byte) with a register value or "Reg" which is 13 (second byte) and the a DW_FORM_block where the third byte 1 is the length of the expression for reg13 and the only byte in the expression is DW_OP_reg12 (4th byte).

This somehow fails to decode only on debian??

VerifyLocs is created using:

  dwarf::RegisterLocations VerifyLocs;
  DataExtractor ExprData({dwarf::DW_OP_reg12}, true, AddrSize);
  DWARFExpression Expr(ExprData, AddrSize);
  VerifyLocs.setRegisterLocation(
      Reg, dwarf::UnwindLocation::createAtDWARFExpression(Expr));

We can easily see the expression data contains _only_ DW_OP_reg12 but in the printout above it says:

  To be equal to: VerifyLocs
        Which is: reg13=[DW_OP_reg10]

No idea how this is getting modified???


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