[PATCH] First step towards PR21189 -- Teach llvm-readobj to dump bits of COFF symbol subsections required to debug using VS2012+

Timur Iskhodzhanov timurrrr at google.com
Fri Oct 17 11:56:48 PDT 2014


================
Comment at: tools/llvm-readobj/COFFDumper.cpp:621
@@ +620,3 @@
+    case COFF::DEBUG_SYMBOL_TYPE_PROC_START: {
+      ListScope S(W, "ProcStart");
+      if (InFunctionScope) {
----------------
nrieck wrote:
> Minor nit. This should be DictScope because the content is not a list.
Done!

Interesting, I kinda think I should actually use `DictScope` in a few other places of `printCodeViewSymbolsSubsection()`...
Can you please suggest me a good criteria of choosing `ListScope` vs `DictScope`?

================
Comment at: tools/llvm-readobj/COFFDumper.cpp:648
@@ +647,3 @@
+    case COFF::DEBUG_SYMBOL_TYPE_PROC_END: {
+      ListScope S(W, "ProcEnd");
+      if (!InFunctionScope) {
----------------
nrieck wrote:
> Ditto here. Does this subsection have any content not added yet? If not, I'd just print "ProcEnd".
Oh, good point!

I've actually went one step further and added an extra `Size` sanity check.

http://reviews.llvm.org/D5755






More information about the llvm-commits mailing list