diff options
author | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-06-12 14:05:44 +0000 |
---|---|---|
committer | Elena Zannoni <ezannoni@kwikemart.cygnus.com> | 2000-06-12 14:05:44 +0000 |
commit | 34e924c0665d359ed95eda418be085e2c49a1e7c (patch) | |
tree | 8c1319317bc5a106d0e118955120eda975c2ddf7 /gdb | |
parent | 80b756a06c4aabe1be6d9442bff2a316b955cc72 (diff) | |
download | gdb-34e924c0665d359ed95eda418be085e2c49a1e7c.zip gdb-34e924c0665d359ed95eda418be085e2c49a1e7c.tar.gz gdb-34e924c0665d359ed95eda418be085e2c49a1e7c.tar.bz2 |
* symfile.c (add_symbol_file_command): Properly reformat "else if"
code.
* coffread.c (coff_symtab_read): Ditto.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/coffread.c | 18 | ||||
-rw-r--r-- | gdb/symfile.c | 85 |
3 files changed, 55 insertions, 54 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bff6797..ade4f40 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2000-06-12 Elena Zannoni <ezannoni@kwikemart.cygnus.com> + + * symfile.c (add_symbol_file_command): Properly reformat "else if" + code. + * coffread.c (coff_symtab_read): Ditto. + Mon Jun 12 15:24:04 2000 Andrew Cagney <cagney@b1.cygnus.com> * Makefile.in (SER_HARDWIRE): Set using autoconf. diff --git a/gdb/coffread.c b/gdb/coffread.c index f64fb9c..c781a34 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -982,22 +982,20 @@ coff_symtab_read (symtab_offset, nsyms, objfile) SMASH_TEXT_ADDRESS (tmpaddr); #endif } - else - if (sec == SECT_OFF_DATA (objfile)) - { + else if (sec == SECT_OFF_DATA (objfile)) + { ms_type = cs->c_sclass == C_EXT || cs->c_sclass == C_THUMBEXT ? mst_data : mst_file_data; - } - else - if (sec == SECT_OFF_BSS (objfile)) - { + } + else if (sec == SECT_OFF_BSS (objfile)) + { ms_type = cs->c_sclass == C_EXT || cs->c_sclass == C_THUMBEXT ? mst_data : mst_file_data; - } - else - ms_type = mst_unknown; + } + else + ms_type = mst_unknown; } if (cs->c_name[0] != '@' /* Skip tdesc symbols */ ) diff --git a/gdb/symfile.c b/gdb/symfile.c index 726bd24..cc0f67d 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -1492,54 +1492,51 @@ add_symbol_file_command (args, from_tty) filename = tilde_expand (arg); my_cleanups = make_cleanup (free, filename); } + else if (argcnt == 1) + { + /* The second argument is always the text address at which + to load the program. */ + sect_opts[section_index].name = ".text"; + sect_opts[section_index].value = arg; + section_index++; + } else - if (argcnt == 1) - { - /* The second argument is always the text address at which - to load the program. */ - sect_opts[section_index].name = ".text"; - sect_opts[section_index].value = arg; - section_index++; - } - else - { - /* It's an option (starting with '-') or it's an argument - to an option */ - - if (*arg == '-') - { - if (strcmp (arg, "-mapped") == 0) - flags |= OBJF_MAPPED; - else - if (strcmp (arg, "-readnow") == 0) - flags |= OBJF_READNOW; - else - if (strcmp (arg, "-s") == 0) - { - if (section_index >= SECT_OFF_MAX) - error ("Too many sections specified."); - expecting_sec_name = 1; - expecting_sec_addr = 1; - } - } - else - { - if (expecting_sec_name) + { + /* It's an option (starting with '-') or it's an argument + to an option */ + + if (*arg == '-') + { + if (strcmp (arg, "-mapped") == 0) + flags |= OBJF_MAPPED; + else if (strcmp (arg, "-readnow") == 0) + flags |= OBJF_READNOW; + else if (strcmp (arg, "-s") == 0) + { + if (section_index >= SECT_OFF_MAX) + error ("Too many sections specified."); + expecting_sec_name = 1; + expecting_sec_addr = 1; + } + } + else + { + if (expecting_sec_name) + { + sect_opts[section_index].name = arg; + expecting_sec_name = 0; + } + else + if (expecting_sec_addr) { - sect_opts[section_index].name = arg; - expecting_sec_name = 0; + sect_opts[section_index].value = arg; + expecting_sec_addr = 0; + section_index++; } else - if (expecting_sec_addr) - { - sect_opts[section_index].value = arg; - expecting_sec_addr = 0; - section_index++; - } - else - error ("USAGE: add-symbol-file <filename> <textaddress> [-mapped] [-readnow] [-s <secname> <addr>]*"); - } - } + error ("USAGE: add-symbol-file <filename> <textaddress> [-mapped] [-readnow] [-s <secname> <addr>]*"); + } + } argcnt++; } |