[PATCH] D38459: [dwarfdump] Add -show-form

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 2 08:49:55 PDT 2017


aprantl added a comment.

Thanks!



================
Comment at: include/llvm/DebugInfo/DIContext.h:144
   bool ShowParents = false;
+  bool ShowForm = false;
   bool SummarizeTypes = false;
----------------
At some point we should convert this to a bitfield or into an enum bitfield.


================
Comment at: test/tools/llvm-dwarfdump/X86/form.test:14
+# RUN: | llvm-dwarfdump --debug-info - \
+# RUN: | FileCheck %s --check-prefix FORM
+
----------------
I find the naming confusing, I would expect FORM to check the case where -F is specified.


================
Comment at: test/tools/llvm-dwarfdump/X86/form.test:41
+# FORM: DW_TAG_compile_unit
+# FORM-NOT: [DW_FORM_strp]
+# FORM-NOT: [DW_FORM_data2]
----------------
why not: `FORM-NOT: DW_FORM_` and be done with it?


================
Comment at: tools/llvm-dwarfdump/llvm-dwarfdump.cpp:174
+static opt<bool>
+    ShowForm("show-form",
+             desc("Show DWARF form types after the DWARF attribute types."),
----------------
please add all new options to the tools/llvm-dwarfdump/cmdline.test testcase, too, it catches bugs  such as the wrong option category.


Repository:
  rL LLVM

https://reviews.llvm.org/D38459





More information about the llvm-commits mailing list