Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc: Add -h/--help options and end marker to demangler_options #1940

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

kangtegong
Copy link
Contributor

This commit adds support for the -h and --help options to display usage of misc/demangler like follows.

  $ misc/demangler -h
  demangler v0.11-683-g804a

   OPTION:
        --simple           Use internal simple demangler (default)
        --full             Use libstdc++ demangler
        --no               Do not use demangler
    -v, --verbose          Be verbose
    -h, --help             Display this help and exit

An end marker has also been added to the demangler_options array for proper termination and prevent potential undefined behavior.

Fixed: #1939

This commit adds support for the -h and --help options to display
usage of misc/demangler like follows.

  $ misc/demangler -h
  demangler v0.11-683-g804a

   OPTION:
        --simple           Use internal simple demangler (default)
        --full             Use libstdc++ demangler
        --no               Do not use demangler
    -v, --verbose          Be verbose
    -h, --help             Display this help and exit

An end marker has also been added to the demangler_options array for
proper termination and prevent potential undefined behavior.

Fixed: namhyung#1939

Signed-off-by: Kang Minchul <tegongkang@gmail.com>
@kangtegong kangtegong changed the title Add -h/--help options and end marker to demangler_options misc: Add -h/--help options and end marker to demangler_options Jun 30, 2024
Copy link
Owner

@namhyung namhyung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@honggyukim
Copy link
Collaborator

Thanks @kangtegong!

@honggyukim honggyukim merged commit c54660b into namhyung:master Aug 14, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"./misc/demangler --unknown" triggers segfault
3 participants