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.
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
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)
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
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;
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. */
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;