summaryrefslogtreecommitdiffstats
path: root/gdb
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1995-04-12 22:17:41 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1995-04-12 22:17:41 +0000
commitf8203ed005ff2eed14a018ba83ed8e4b111f7bbe (patch)
treea7249976784123dad643fd9e0835c94cfd234f0f /gdb
parent0fb26eac12dad00e77d98f010234c0bee7ca03a0 (diff)
downloadppe42-binutils-f8203ed005ff2eed14a018ba83ed8e4b111f7bbe.tar.gz
ppe42-binutils-f8203ed005ff2eed14a018ba83ed8e4b111f7bbe.zip
* xcoffread.c: Call complain() rather than error() or printing a
warning.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/xcoffread.c42
2 files changed, 26 insertions, 21 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 80b4bb573e..9e706d83e2 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+Wed Apr 12 14:34:31 1995 Jim Kingdon <kingdon@deneb.cygnus.com>
+
+ * xcoffread.c: Call complain() rather than error() or printing a
+ warning.
+
start-sanitize-arc
Wed Apr 12 08:15:27 1995 Doug Evans <dje@canuck.cygnus.com>
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 7ee67940bd..c727642ccb 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -152,6 +152,9 @@ static struct complaint storclass_complaint =
static struct complaint bf_notfound_complaint =
{"line numbers off, `.bf' symbol not found", 0, 0};
+extern struct complaint ef_complaint;
+extern struct complaint eb_complaint;
+
static void
enter_line_range PARAMS ((struct subfile *, unsigned, unsigned,
CORE_ADDR, CORE_ADDR, unsigned *));
@@ -1633,10 +1636,13 @@ read_xcoff_symtab (objfile, nsyms)
fcn_last_line = main_aux.x_sym.x_misc.x_lnsz.x_lnno;
new = pop_context ();
- if (context_stack_depth != 0)
- error ("\
- invalid symbol data; .bf/.ef/.bb/.eb symbol mismatch, at symbol %d.",
- symnum);
+ /* Stack must be empty now. */
+ if (context_stack_depth > 0 || new == NULL)
+ {
+ complain (&ef_complaint, cs->c_symnum);
+ within_function = 0;
+ break;
+ }
finish_block (new->name, &local_symbols, new->old_blocks,
new->start_addr,
@@ -1665,12 +1671,16 @@ read_xcoff_symtab (objfile, nsyms)
case C_ARG:
case C_REGPARM:
+ case C_REG:
case C_TPDEF:
case C_STRTAG:
case C_UNTAG:
case C_ENTAG:
- printf_unfiltered
- ("ERROR: Unimplemented storage class: %d.\n", cs->c_sclass);
+ {
+ static struct complaint msg =
+ {"Unrecognized storage class %d.", 0, 0};
+ complain (&msg, cs->c_sclass);
+ }
break;
case C_LABEL:
@@ -1741,12 +1751,11 @@ read_xcoff_symtab (objfile, nsyms)
else if (STREQ (cs->c_name, ".eb"))
{
new = pop_context ();
- if (depth != new->depth)
- error ("\
- Invalid symbol data: .bb/.eb symbol mismatch at symbol %d.",
- symnum);
-
- depth--;
+ if (depth-- != new->depth)
+ {
+ complain (&eb_complaint, symnum);
+ break;
+ }
if (local_symbols && context_stack_depth > 0)
{
/* Make a block for the local symbols within. */
@@ -1937,15 +1946,6 @@ process_xcoff_symbol (cs, objfile)
(sym2, within_function ? &local_symbols : &file_symbols);
break;
- case C_REG:
- printf_unfiltered ("ERROR! C_REG is not fully implemented!\n");
- SYMBOL_CLASS (sym) = LOC_REGISTER;
- SYMBOL_NAME (sym) = SYMNAME_ALLOC (name, symname_alloced);
- SYMBOL_SECTION (sym) = cs->c_secnum;
- SYMBOL_DUP (sym, sym2);
- add_symbol_to_list (sym2, &local_symbols);
- break;
-
case C_RSYM:
pp = (char*) strchr (name, ':');
if (pp)
OpenPOWER on IntegriCloud