aboutsummaryrefslogtreecommitdiff
path: root/binutils/objdump.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2000-07-20 18:02:56 +0000
committerNick Clifton <nickc@redhat.com>2000-07-20 18:02:56 +0000
commit28c309a2879d8f66e75cd84b049ff49d508a36c6 (patch)
treef301b3cf30e87822c6fe0b712ea2b7aa51310903 /binutils/objdump.c
parent483f05e373e2ec8f9ff6a37f5c8d8deca3138ea3 (diff)
downloadgdb-28c309a2879d8f66e75cd84b049ff49d508a36c6.zip
gdb-28c309a2879d8f66e75cd84b049ff49d508a36c6.tar.gz
gdb-28c309a2879d8f66e75cd84b049ff49d508a36c6.tar.bz2
Add optional style argument to --demangle switch.
Diffstat (limited to 'binutils/objdump.c')
-rw-r--r--binutils/objdump.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/binutils/objdump.c b/binutils/objdump.c
index 0d4a2c9..d71888a 100644
--- a/binutils/objdump.c
+++ b/binutils/objdump.c
@@ -255,7 +255,9 @@ usage (stream, status)
-EL --endian=little Assume little endian format when disassembling\n\
--file-start-context Include context from start of file (with -S)\n\
-l, --line-numbers Include line numbers and filenames in output\n\
- -C, --demangle Decode mangled/processed symbol names\n\
+ -C, --demangle[=STYLE] Decode mangled/processed symbol names\n\
+ The STYLE, if specified, can be `auto', 'gnu',\n\
+ 'lucid', 'arm', 'hp', 'edg', or 'gnu-new-abi'\n\
-w, --wide Format output for more than 80 columns\n\
-z, --disassemble-zeroes Do not skip blocks of zeroes when disassembling\n\
--start-address=ADDR Only process data whoes address is >= ADDR\n\
@@ -288,7 +290,7 @@ static struct option long_options[]=
{"architecture", required_argument, NULL, 'm'},
{"archive-headers", no_argument, NULL, 'a'},
{"debugging", no_argument, NULL, 'g'},
- {"demangle", no_argument, NULL, 'C'},
+ {"demangle", optional_argument, NULL, 'C'},
{"disassemble", no_argument, NULL, 'd'},
{"disassemble-all", no_argument, NULL, 'D'},
{"disassembler-options", required_argument, NULL, 'M'},
@@ -2833,6 +2835,17 @@ main (argc, argv)
break;
case 'C':
do_demangle = true;
+ if (optarg != NULL)
+ {
+ enum demangling_styles style;
+
+ style = cplus_demangle_name_to_style (optarg);
+ if (style == unknown_demangling)
+ fatal (_("unknown demangling style `%s'"),
+ optarg);
+
+ cplus_demangle_set_style (style);
+ }
break;
case 'w':
wide_output = true;