[PATCH] D56853: [llvm-objdump] - Show aliases in -help.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 18 00:42:57 PST 2019


grimar added a comment.

In D56853#1361899 <https://reviews.llvm.org/D56853#1361899>, @ruiu wrote:

> LGTM
>
> I think this is a good change, and I agree with you that we don't need to test each alias.
>
> Speaking of the `--help` message, I found there are other weird stuff there.  The options in the `--help` message are categorized as "Color Options", "General options" and "Generic Options". There is only one option under the "Color Options" category, which is `--color`. Most options are under "General Options". `--help` and `--version` are under "Generic Options". Frankly, these categories doesn't make sense at all to me. (what's the difference between "Generic" and "General"?)
>
> Maybe we should remove the categories and display all options just asciibetically.


Yeah, I also noticed that. I *guess* it somehow can be related with GNU objdump which seems to divide options into two groups (required and optional):

>   At least one of the following switches must be given:
>    -a, --archive-headers    Display archive header information
>    -f, --file-headers       Display the contents of the overall file header
>    -p, --private-headers    Display object format specific file header contents
> 
> ....
> 
>   The following switches are optional:
>    -b, --target=BFDNAME           Specify the target object format as BFDNAME
>    -m, --architecture=MACHINE     Specify the target architecture as MACHINE
>    -j, --section=NAME             Only display information for section NAME
>    -M, --disassembler-options=OPT Pass text OPT on to the disassembler
> 
> ....

Perhaps the intention was to do something like that, but something went wrong. I agree that just listing them asciibetically would be better than what is done now.
I'll try to suggest a patch on the next week if nobody do that earlier.


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

https://reviews.llvm.org/D56853





More information about the llvm-commits mailing list