[PATCH] D80959: [llvm-dwarfdump] Print =<offset> after --debug-* options in help output.
Jonas Devlieghere via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 1 15:11:36 PDT 2020
JDevlieghere created this revision.
JDevlieghere added reviewers: aprantl, dblaikie, jhenderson, MaskRay, ikudrin, probinson.
Herald added a subscriber: cmtice.
Herald added a project: LLVM.
JDevlieghere updated this revision to Diff 267747.
JDevlieghere added a comment.
Print an error when passing a value to a flag that doesn't take one.
$ ./bin/llvm-dwarfdump --debug-names=0x0
llvm-dwarfdump: for the --debug-names option: this is a flag and does not take a value.
Some of the --debug-* options can take an optional offset. Although the man page does a good job of making that clear it's less discoverable from the help output. Currently the only reference to this is the following sentence:
> Where applicable these parameters take an optional =<offset> argument to dump only the entry at the specified offset.
This patch changes the help output from
--debug-info= - Dump the .debug_info section
to
--debug-info=<offset> - Dump the .debug_info section
Unfortunately this is still suboptimal. What I'd like to have is
--debug-info[=<offset>] - Dump the .debug_info section
but I don't think cl::opt supports that.
rdar://problem/63150066
https://reviews.llvm.org/D80959
Files:
llvm/docs/CommandGuide/llvm-dwarfdump.rst
llvm/include/llvm/BinaryFormat/Dwarf.def
llvm/include/llvm/DebugInfo/DIContext.h
llvm/test/tools/llvm-dwarfdump/cmdline.test
llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80959.267747.patch
Type: text/x-patch
Size: 11752 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200601/7448c200/attachment.bin>
More information about the llvm-commits
mailing list