aboutsummaryrefslogtreecommitdiff
path: root/gdb/xcoffread.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-04-20 17:07:11 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-04-20 17:07:11 +0000
commit963dbabee775d054e675f63bb6535723d49a14a7 (patch)
treea7894135691917e26c28d6a6f7a90a8fb2a17b0c /gdb/xcoffread.c
parent703e4251af287e5ab16b3e91b5aea293fb49be7c (diff)
downloadgdb-963dbabee775d054e675f63bb6535723d49a14a7.zip
gdb-963dbabee775d054e675f63bb6535723d49a14a7.tar.gz
gdb-963dbabee775d054e675f63bb6535723d49a14a7.tar.bz2
* xcoffread.c (xcoff_next_symbol_text): Don't return before
updating raw_symbol and symnum. Return a value in the case where we complained.
Diffstat (limited to 'gdb/xcoffread.c')
-rw-r--r--gdb/xcoffread.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 7d93098..de8f77a 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -983,16 +983,32 @@ xcoff_next_symbol_text ()
struct internal_syment symbol;
static struct complaint msg =
{"Unexpected symbol continuation", 0, 0};
+ char *retval;
bfd_coff_swap_sym_in (current_objfile->obfd, raw_symbol, &symbol);
if (symbol.n_zeroes)
- complain (&msg);
+ {
+ complain (&msg);
+
+ /* Return something which points to '\0' and hope the symbol reading
+ code does something reasonable. */
+ retval = "";
+ }
else if (symbol.n_sclass & 0x80)
- return debugsec + symbol.n_offset;
+ {
+ retval = debugsec + symbol.n_offset;
+ raw_symbol += coff_data (current_objfile->obfd)->local_symesz;
+ ++symnum;
+ }
else
- complain (&msg);
- raw_symbol += coff_data (current_objfile->obfd)->local_symesz;
- ++symnum;
+ {
+ complain (&msg);
+
+ /* Return something which points to '\0' and hope the symbol reading
+ code does something reasonable. */
+ retval = "";
+ }
+ return retval;
}
/* read the whole symbol table of a given bfd. */