namhyung / uftrace

Function graph tracer for C/C++/Rust/Python
https://uftrace.github.io/slide/
GNU General Public License v2.0
2.92k stars 419 forks source link

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

Open kangtegong opened 6 days ago

kangtegong commented 6 days ago

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

honggyukim commented 4 days ago

Thanks @kangtegong!