[PATCH] Teach llvm-readobj to dump symbol records from a DEBUG_SYMBOL_SUBSECTION section.

Timur Iskhodzhanov timurrrr at google.com
Mon Feb 16 08:20:02 PST 2015


Changing scope and renaming: LGTM

You might want to reconsider some details after reading the comments.


================
Comment at: tools/llvm-readobj/COFFDumper.cpp:509
@@ -508,3 +508,3 @@
       StringRef Contents = Data.substr(Offset, PayloadSize);
       W.printBinaryBlock("Contents", Contents);
 
----------------
We might want to put this under an `if ()` (see the other comment at the deifinition of `CodeViewSymbols`)

================
Comment at: tools/llvm-readobj/COFFDumper.cpp:701
@@ +700,3 @@
+        ListScope S(W, "Record");
+        W.printHex("Length", Size);
+        W.printHex("Type", Type);
----------------
nit: I suggest either
  W.printHex("Size", Size);
or rename `Size` to `Length`?
Or `SegmentSize`?

================
Comment at: tools/llvm-readobj/llvm-readobj.h:40
@@ -40,1 +39,3 @@
+  extern llvm::cl::opt<bool> CodeView;
+  extern llvm::cl::opt<bool> CodeViewSymbols;
   extern llvm::cl::opt<bool> ARMAttributes;
----------------
We might consider reusing `SectionSymbols`?

If the main purpose of `CodeViewSymbols` is to dump subsections we can't parse/dump yet, maybe we should use `CodeViewDumpUnknownParts` or something?

http://reviews.llvm.org/D7664

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list