This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH/RFA] Remove dead code
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Thu, 24 Jun 2004 22:28:53 +0200 (CEST)
- Subject: [PATCH/RFA] Remove dead code
Nothings defines SUN_FIXED_LBRAC_BUG anymore, so I guess this can go.
OK?
Mark
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* dbxread.c (process_one_symbol) [SUN_FIXED_LBRAC_BUG]: Remove
dead code.
Index: doc/ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* gdbint.texinfo (Target Architecture Definition): Remove
SUN_FIXED_LBRAC_BUG.
Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.67
diff -u -p -r1.67 dbxread.c
--- dbxread.c 10 Jun 2004 20:05:43 -0000 1.67
+++ dbxread.c 24 Jun 2004 20:27:27 -0000
@@ -2648,17 +2648,6 @@ process_one_symbol (int type, int desc,
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
-
struct context_stack *new;
/* This remembers the address of the start of a function. It is used
because in Solaris 2, N_LBRAC, N_RBRAC, and N_SLINE entries are
@@ -2766,14 +2755,6 @@ process_one_symbol (int type, int desc,
N_SO, the linker did not relocate them (sigh). */
valu += last_source_start_addr;
-#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 */
- complaint (&symfile_complaints, "bad block start address patched");
- valu = last_pc_address;
- }
-#endif
new = push_context (desc, valu);
break;
@@ -2887,10 +2868,6 @@ process_one_symbol (int type, int desc,
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. */
if (context_stack_depth > 0)
@@ -2959,9 +2936,6 @@ process_one_symbol (int type, int desc,
/* 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
/* If this is the first SLINE note in the function, record it at
the start of the function instead of at the listed location. */
if (within_function && sline_found_in_function == 0)
@@ -3121,56 +3095,6 @@ process_one_symbol (int type, int desc,
}
#endif
-#ifdef SUN_FIXED_LBRAC_BUG
- /* The Sun acc compiler, under SunOS4, puts out
- functions with N_GSYM or N_STSYM. The problem is
- that the address of the symbol is no good (for N_GSYM
- it doesn't even attept an address; for N_STSYM it
- puts out an address but then it gets relocated
- relative to the data segment, not the text segment).
- Currently we can't fix this up later as we do for
- some types of symbol in scan_file_globals.
- Fortunately we do have a way of finding the address -
- we know that the value in last_pc_address is either
- the one we want (if we're dealing with the first
- function in an object file), or somewhere in the
- previous function. This means that we can use the
- minimal symbol table to get the address. */
-
- /* Starting with release 3.0, the Sun acc compiler,
- under SunOS4, puts out functions with N_FUN and a value
- of zero. This gets relocated to the start of the text
- segment of the module, which is no good either.
- Under SunOS4 we can deal with this as N_SLINE and N_SO
- entries contain valid absolute addresses.
- Release 3.0 acc also puts out N_OPT entries, which makes
- it possible to discern acc from cc or gcc. */
-
- if (type == N_GSYM || type == N_STSYM
- || (type == N_FUN
- && n_opt_found && !block_address_function_relative))
- {
- struct minimal_symbol *m;
- int l = colon_pos - name;
-
- m = lookup_minimal_symbol_by_pc (last_pc_address);
- if (m && strncmp (DEPRECATED_SYMBOL_NAME (m), name, l) == 0
- && DEPRECATED_SYMBOL_NAME (m)[l] == '\0')
- /* last_pc_address was in this function */
- valu = SYMBOL_VALUE (m);
- else if (m && DEPRECATED_SYMBOL_NAME (m + 1)
- && strncmp (DEPRECATED_SYMBOL_NAME (m + 1), name, l) == 0
- && DEPRECATED_SYMBOL_NAME (m + 1)[l] == '\0')
- /* last_pc_address was in last function */
- valu = SYMBOL_VALUE (m + 1);
- else
- /* Not found - use last_pc_address (for finish_block) */
- valu = last_pc_address;
- }
-
- last_pc_address = valu; /* Save for SunOS bug circumcision */
-#endif
-
if (block_address_function_relative)
/* For Solaris 2.0 compilers, the block addresses and
N_SLINE's are relative to the start of the
Index: doc/gdbint.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdbint.texinfo,v
retrieving revision 1.211
diff -u -p -r1.211 gdbint.texinfo
--- doc/gdbint.texinfo 20 Jun 2004 17:18:07 -0000 1.211
+++ doc/gdbint.texinfo 24 Jun 2004 20:27:35 -0000
@@ -3767,10 +3767,6 @@ value that is to be returned.
This method has been deprecated in favour of @code{gdbarch_return_value}
(@pxref{gdbarch_return_value}).
-@item SUN_FIXED_LBRAC_BUG
-@findex SUN_FIXED_LBRAC_BUG
-(Used only for Sun-3 and Sun-4 targets.)
-
@item SYMBOL_RELOADING_DEFAULT
@findex SYMBOL_RELOADING_DEFAULT
The default value of the ``symbol-reloading'' variable. (Never defined in