aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-10-13 10:00:30 +0000
committerNick Clifton <nickc@redhat.com>2001-10-13 10:00:30 +0000
commitf662939a0db874ee0322c50ffcf0a6f50b7878d3 (patch)
treeed4acb6a7c969f48e6a5041076aa281468a4f278
parent05d2d07e5f3c0e6bac6decc539f2fe9cde2d35bd (diff)
downloadgdb-f662939a0db874ee0322c50ffcf0a6f50b7878d3.zip
gdb-f662939a0db874ee0322c50ffcf0a6f50b7878d3.tar.gz
gdb-f662939a0db874ee0322c50ffcf0a6f50b7878d3.tar.bz2
support multiple options to the -w switch
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/readelf.c76
2 files changed, 45 insertions, 36 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index b438d4d..62da647 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * readelf.c (parse_args): Handle multiple options to the -w
+ switch.
+
2001-10-12 Jakub Jelinek <jakub@redhat.com>
* readelf.c (get_section_type_name): Don't print SHT_ prefix for
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 18bde69..3bed274 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -2202,49 +2202,53 @@ parse_args (argc, argv)
do_debugging = 1;
else
{
+ unsigned int index = 0;
+
do_debugging = 0;
- switch (optarg[0])
- {
- case 'i':
- case 'I':
- do_debug_info = 1;
- break;
- case 'a':
- case 'A':
- do_debug_abbrevs = 1;
- break;
+ while (optarg[index])
+ switch (optarg[index++])
+ {
+ case 'i':
+ case 'I':
+ do_debug_info = 1;
+ break;
- case 'l':
- case 'L':
- do_debug_lines = 1;
- break;
+ case 'a':
+ case 'A':
+ do_debug_abbrevs = 1;
+ break;
- case 'p':
- case 'P':
- do_debug_pubnames = 1;
- break;
+ case 'l':
+ case 'L':
+ do_debug_lines = 1;
+ break;
- case 'r':
- case 'R':
- do_debug_aranges = 1;
- break;
+ case 'p':
+ case 'P':
+ do_debug_pubnames = 1;
+ break;
- case 'F':
- do_debug_frames_interp = 1;
- case 'f':
- do_debug_frames = 1;
- break;
+ case 'r':
+ case 'R':
+ do_debug_aranges = 1;
+ break;
- case 'm':
- case 'M':
- do_debug_macinfo = 1;
- break;
+ case 'F':
+ do_debug_frames_interp = 1;
+ case 'f':
+ do_debug_frames = 1;
+ break;
- default:
- warn (_("Unrecognised debug option '%s'\n"), optarg);
- break;
- }
+ case 'm':
+ case 'M':
+ do_debug_macinfo = 1;
+ break;
+
+ default:
+ warn (_("Unrecognised debug option '%s'\n"), optarg);
+ break;
+ }
}
break;
#ifdef SUPPORT_DISASSEMBLY
@@ -7046,7 +7050,7 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
/* DWARF 2.1 values. */
case DW_LANG_C99: printf ("(ANSI C99)"); break;
case DW_LANG_Ada95: printf ("(ADA 95)"); break;
- case DW_LANG_Fortran95: printf ("(Fortran 95)"); break;
+ case DW_LANG_Fortran95: printf ("(Fortran 95)"); break;
/* MIPS extension. */
case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break;
default: printf ("(Unknown: %lx)", uvalue); break;