[PATCH] D63084: [llvm-readobj] Don't abort printing of dynamic table if string reference is invalid

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 01:53:33 PDT 2019


MaskRay added inline comments.


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:1942
+    OS << TagNames.at(Type) << ": ";
+    if (DynamicStringTable.size() == 0)
+      OS << "<String table is empty or was not found> ";
----------------
DynamicStringTable.empty()


================
Comment at: llvm/tools/llvm-readobj/ELFDumper.cpp:1947
+    else
+      OS << "<Invalid Offset 0x" << utohexstr(Value) << ">";
     break;
----------------
`O->o` i.e. `<Invalid offset 0x`?

Alternatively, make it all lowercase: `<invalid offset 0x`. I'm just not sure which style is more common in this file.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63084/new/

https://reviews.llvm.org/D63084





More information about the llvm-commits mailing list