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

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 06:11:13 PST 2020


jhenderson added inline comments.


================
Comment at: llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h:492
 
+  /// Get the OperandType as a "const char *
+  static const char *operandTypeString(OperandType OT);
----------------



================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:448
+        errc::invalid_argument,
+        "op[%" PRIu32 "] has OperandType OT_Address which produces a unsigned "
+        "result, call getOperandAsUnsigned instead",
----------------



================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:455
+
+  case OT_Register:
+    return createStringError(
----------------
Looks like this could be merged with `OT_Address`?


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:478
+                               "op[%" PRIu32
+                               "] has type OT_UnsignedFactDataOffset but data "
+                               "alignment is zero",
----------------
This and the above case look like they have the operand type in the message. Aside from that, I think they're identical, so can they be merged?


================
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,
----------------
MaskRay wrote:
> jhenderson wrote:
> > MaskRay wrote:
> > > 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
> > @MaskRay, I thought that too, but I've been unable to find where the description comes from. Could you point me at it, please?
> https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html EILSEQ "Illegal byte sequence.". This is brief but in other pages in POSIX you can find descriptions like "The data obtained from the input stream does not form a valid character." "The wide-character code wc does not correspond to a valid character."
Thanks.


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