[PATCH] D80959: [llvm-dwarfdump] Print =<offset> after --debug-* options in help output.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 3 01:36:14 PDT 2020


jhenderson added a comment.

Couple of post-commit review comments from me.



================
Comment at: llvm/docs/CommandGuide/llvm-dwarfdump.rst:152
 
-.. option:: --debug-abbrev, --debug-addr, --debug-aranges, --debug-cu-index, --debug-frame [=<offset>], --debug-gnu-pubnames, --debug-gnu-pubtypes, --debug-info [=<offset>], --debug-line [=<offset>], --debug-line-str, --debug-loc [=<offset>], --debug-loclists [=<offset>], --debug-macro, --debug-names, --debug-pubnames, --debug-pubtypes, --debug-ranges, --debug-rnglists, --debug-str, --debug-str-offsets, --debug-tu-index, --debug-types, --eh-frame [=<offset>], --gdb-index, --apple-names, --apple-types, --apple-namespaces, --apple-objc
+.. option:: --debug-abbrev, --debug-addr, --debug-aranges, --debug-cu-index, --debug-frame [=<offset>], --debug-gnu-pubnames, --debug-gnu-pubtypes, --debug-info [=<offset>], --debug-line [=<offset>], --debug-line-str, --debug-loc [=<offset>], --debug-loclists [=<offset>], --debug-macro, --debug-names, --debug-pubnames, --debug-pubtypes, --debug-ranges, --debug-rnglists, --debug-str, --debug-str-offsets, --debug-tu-index, --debug-types [=<offset>], --eh-frame [=<offset>], --gdb-index, --apple-names, --apple-types, --apple-namespaces, --apple-objc
 
----------------
MaskRay wrote:
> I think there should be no space before `[=<offset>]`, because the user specifies `--eh-frame=0`, instead of `--eh-frame =0`
Unfortunately, if you take a look at the formatted output, if there is no space, the opening square brackets ends up bolded like the option name (see https://llvm.org/docs/CommandGuide/llvm-dwarfdump.html). I think you need to re-add the space before `[=<offset>]` to fix it (it was the only solution I found with llvm-symbolizer --functions which has a similar problem). If you can come up with an alternative solution without the space, I'd also be happy!


================
Comment at: llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp:92
+    if (Arg != "")
+      return O.error("this is a flag and does not take a value.");
+    Val.Val = 0;
----------------
Error messages should not end with a full stop (see recent Coding Standards updates) to be consistent with the majority of diagnostics elsewhere.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80959





More information about the llvm-commits mailing list