aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-06-13 18:46:47 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-06-13 18:46:47 +0000
commita5e6391b44307e36e2fb5d824bc21044cc9527f2 (patch)
treebc5d6923d28c3189dad7672e99ffa999159098f6
parent9748446f533aef6d3a568667e37b55c74f078f4d (diff)
downloadgdb-a5e6391b44307e36e2fb5d824bc21044cc9527f2.zip
gdb-a5e6391b44307e36e2fb5d824bc21044cc9527f2.tar.gz
gdb-a5e6391b44307e36e2fb5d824bc21044cc9527f2.tar.bz2
* dbxread.c (process_one_symbol): If SUN_FIXED_LBRAC_BUG is not
defined, don't worry about Sun's silly LBRAC bug. * dbxread.c (process_one_symbol): If there's a symbol before an N_SO, don't error(). (case N_BCOMM): complain () not error ().
-rw-r--r--gdb/ChangeLog8
-rw-r--r--gdb/dbxread.c35
2 files changed, 33 insertions, 10 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index e886fe4..f61c5e0 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,13 @@
Sun Jun 13 09:17:48 1993 Jim Kingdon (kingdon@cygnus.com)
+ * dbxread.c (process_one_symbol): If SUN_FIXED_LBRAC_BUG is not
+ defined, don't worry about Sun's silly LBRAC bug.
+ * config/m68k/tm-sun3.h: Define SUN_FIXED_LBRAC_BUG to 0.
+
+ * dbxread.c (process_one_symbol): If there's a symbol before an
+ N_SO, don't error().
+ (case N_BCOMM): complain () not error ().
+
* defs.h, main.c (catch_errors): Add return_mask arg.
stack.c (print_frame_info): Pass RETURN_MASK_ERROR.
other callers: Pass RETURN_MASK_ALL.
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index 3e6b680..345dd75 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -1465,10 +1465,16 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
struct section_offsets *section_offsets;
struct objfile *objfile;
{
+#ifdef SUN_FIXED_LBRAC_BUG
+ /* If SUN_FIXED_LBRAC_BUG is defined, then it tells us whether we need
+ to correct the address of N_LBRAC's. If it is not defined, then
+ we never need to correct the addresses. */
+
/* This records the last pc address we've seen. We depend on there being
an SLINE or FUN or SO before the first LBRAC, since the variable does
not get reset in between reads of different symbol files. */
static CORE_ADDR last_pc_address;
+#endif
register struct context_stack *new;
/* This remembers the address of the start of a function. It is used
@@ -1503,14 +1509,11 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
if (last_source_file == NULL && type != (unsigned char)N_SO)
{
- /* Currently this ignores N_ENTRY on Gould machines, N_NSYM on machines
- where that code is defined. */
- if (IGNORE_SYMBOL (type))
- return;
-
- /* FIXME, this should not be an error, since it precludes extending
- the symbol table information in this way... */
- error ("Invalid symbol data: does not start by identifying a source file.");
+ /* Ignore any symbols which appear before an N_SO symbol. Currently
+ no one puts symbols there, but we should deal gracefully with the
+ case. A complain()t might be in order (if !IGNORE_SYMBOL (type)),
+ but this should not be an error (). */
+ return;
}
switch (type)
@@ -1544,7 +1547,9 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
break;
}
+#ifdef SUN_FIXED_LBRAC_BUG
last_pc_address = valu; /* Save for SunOS bug circumcision */
+#endif
if (block_address_function_relative)
/* On Solaris 2.0 compilers, the block addresses and N_SLINE's
@@ -1587,11 +1592,13 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
valu += last_source_start_addr;
#endif
+#ifdef SUN_FIXED_LBRAC_BUG
if (!SUN_FIXED_LBRAC_BUG && valu < last_pc_address) {
/* Patch current LBRAC pc value to match last handy pc value */
complain (&lbrac_complaint);
valu = last_pc_address;
}
+#endif
new = push_context (desc, valu);
break;
@@ -1679,7 +1686,9 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
n_opt_found = 0;
+#ifdef SUN_FIXED_LBRAC_BUG
last_pc_address = valu; /* Save for SunOS bug circumcision */
+#endif
#ifdef PCC_SOL_BROKEN
/* pcc bug, occasionally puts out SO for SOL. */
@@ -1738,14 +1747,20 @@ process_one_symbol (type, desc, valu, name, section_offsets, objfile)
Enter it in the line list for this symbol table. */
/* Relocate for dynamic loading and for ELF acc fn-relative syms. */
valu += function_start_offset;
+#ifdef SUN_FIXED_LBRAC_BUG
last_pc_address = valu; /* Save for SunOS bug circumcision */
+#endif
record_line (current_subfile, desc, valu);
break;
case N_BCOMM:
if (common_block)
- error ("Invalid symbol data: common within common at symtab pos %d",
- symnum);
+ {
+ static struct complaint msg = {
+ "Invalid symbol data: common within common at symtab pos %d",
+ 0, 0};
+ complain (&msg, symnum);
+ }
common_block = local_symbols;
common_block_i = local_symbols ? local_symbols->nsyms : 0;
break;