This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[obish?] Delete deprecated_entry_file_* from symtab
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 04 May 2004 11:07:40 -0400
- Subject: [obish?] Delete deprecated_entry_file_* from symtab
Hello,
These fields while no longer being used are still being set. This patch
removes both the fields and the code trying to set them.
It's fairly obvious but I'll give it a few days,
Andrew
2004-05-04 Andrew Cagney <cagney@redhat.com>
* objfiles.h (struct entry_info): Delete unused fields
deprecated_entry_file_lowpc and deprecated_entry_file_highpc.
* objfiles.c (init_entry_point_info, objfile_relocate): Update.
* mipsread.c (mipscoff_symfile_read): Update.
* mdebugread.c (parse_partial_symbols): Update.
* dwarfread.c (read_file_scope): Update.
* dwarf2read.c (read_file_scope): Update.
* dbxread.c (read_dbx_symtab, read_dbx_symtab): Update.
* coffread.c (complete_symtab): Update.
Index: coffread.c
===================================================================
RCS file: /cvs/src/src/gdb/coffread.c,v
retrieving revision 1.54
diff -p -u -r1.54 coffread.c
--- coffread.c 2 Apr 2004 19:23:05 -0000 1.54
+++ coffread.c 4 May 2004 15:04:18 -0000
@@ -385,13 +385,6 @@ complete_symtab (char *name, CORE_ADDR s
last_source_file = savestring (name, strlen (name));
current_source_start_addr = start_addr;
current_source_end_addr = start_addr + size;
-
- if (current_objfile->ei.entry_point >= current_source_start_addr &&
- current_objfile->ei.entry_point < current_source_end_addr)
- {
- current_objfile->ei.deprecated_entry_file_lowpc = current_source_start_addr;
- current_objfile->ei.deprecated_entry_file_highpc = current_source_end_addr;
- }
}
/* Finish the symbol definitions for one main source file,
Index: dbxread.c
===================================================================
RCS file: /cvs/src/src/gdb/dbxread.c,v
retrieving revision 1.64
diff -p -u -r1.64 dbxread.c
--- dbxread.c 14 Feb 2004 15:46:32 -0000 1.64
+++ dbxread.c 4 May 2004 15:04:18 -0000
@@ -1358,12 +1358,6 @@ read_dbx_symtab (struct objfile *objfile
|| (namestring[(nsl = strlen (namestring)) - 1] == 'o'
&& namestring[nsl - 2] == '.'))
{
- if (objfile->ei.entry_point < nlist.n_value &&
- objfile->ei.entry_point >= last_o_file_start)
- {
- objfile->ei.deprecated_entry_file_lowpc = last_o_file_start;
- objfile->ei.deprecated_entry_file_highpc = nlist.n_value;
- }
if (past_first_source_file && pst
/* The gould NP1 uses low values for .o and -l symbols
which are not the address. */
@@ -2099,16 +2093,6 @@ read_dbx_symtab (struct objfile *objfile
}
/* If there's stuff to be cleaned up, clean it up. */
- if (DBX_SYMCOUNT (objfile) > 0 /* We have some syms */
- /*FIXME, does this have a bug at start address 0? */
- && last_o_file_start
- && objfile->ei.entry_point < nlist.n_value
- && objfile->ei.entry_point >= last_o_file_start)
- {
- objfile->ei.deprecated_entry_file_lowpc = last_o_file_start;
- objfile->ei.deprecated_entry_file_highpc = nlist.n_value;
- }
-
if (pst)
{
/* Don't set pst->texthigh lower than it already is. */
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.150
diff -p -u -r1.150 dwarf2read.c
--- dwarf2read.c 4 May 2004 00:11:25 -0000 1.150
+++ dwarf2read.c 4 May 2004 15:04:19 -0000
@@ -2351,13 +2351,6 @@ read_file_scope (struct die_info *die, s
}
}
- if (objfile->ei.entry_point >= lowpc &&
- objfile->ei.entry_point < highpc)
- {
- objfile->ei.deprecated_entry_file_lowpc = lowpc;
- objfile->ei.deprecated_entry_file_highpc = highpc;
- }
-
attr = dwarf2_attr (die, DW_AT_language, cu);
if (attr)
{
Index: dwarfread.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarfread.c,v
retrieving revision 1.38
diff -p -u -r1.38 dwarfread.c
--- dwarfread.c 1 May 2004 22:30:27 -0000 1.38
+++ dwarfread.c 4 May 2004 15:04:19 -0000
@@ -1893,12 +1893,6 @@ read_file_scope (struct dieinfo *dip, ch
struct cleanup *back_to;
struct symtab *symtab;
- if (objfile->ei.entry_point >= dip->at_low_pc &&
- objfile->ei.entry_point < dip->at_high_pc)
- {
- objfile->ei.deprecated_entry_file_lowpc = dip->at_low_pc;
- objfile->ei.deprecated_entry_file_highpc = dip->at_high_pc;
- }
set_cu_language (dip);
if (dip->at_producer != NULL)
{
Index: mdebugread.c
===================================================================
RCS file: /cvs/src/src/gdb/mdebugread.c,v
retrieving revision 1.61
diff -p -u -r1.61 mdebugread.c
--- mdebugread.c 1 May 2004 00:34:54 -0000 1.61
+++ mdebugread.c 4 May 2004 15:04:20 -0000
@@ -3601,13 +3601,6 @@ parse_partial_symbols (struct objfile *o
includes_used = 0;
dependencies_used = 0;
- if (objfile->ei.entry_point >= save_pst->textlow &&
- objfile->ei.entry_point < save_pst->texthigh)
- {
- objfile->ei.deprecated_entry_file_lowpc = save_pst->textlow;
- objfile->ei.deprecated_entry_file_highpc = save_pst->texthigh;
- }
-
/* The objfile has its functions reordered if this partial symbol
table overlaps any other partial symbol table.
We cannot assume a reordered objfile if a partial symbol table
Index: mipsread.c
===================================================================
RCS file: /cvs/src/src/gdb/mipsread.c,v
retrieving revision 1.16
diff -p -u -r1.16 mipsread.c
--- mipsread.c 1 May 2004 00:34:55 -0000 1.16
+++ mipsread.c 4 May 2004 15:04:20 -0000
@@ -102,25 +102,6 @@ mipscoff_symfile_read (struct objfile *o
minimal symbols for this objfile. */
install_minimal_symbols (objfile);
-
- /* If the entry_file bounds are still unknown after processing the
- partial symbols, then try to set them from the minimal symbols
- surrounding the entry_point. */
-
- if (mainline
- && objfile->ei.entry_point != INVALID_ENTRY_POINT
- && objfile->ei.deprecated_entry_file_lowpc == INVALID_ENTRY_LOWPC)
- {
- struct minimal_symbol *m;
-
- m = lookup_minimal_symbol_by_pc (objfile->ei.entry_point);
- if (m && DEPRECATED_SYMBOL_NAME (m + 1))
- {
- objfile->ei.deprecated_entry_file_lowpc = SYMBOL_VALUE_ADDRESS (m);
- objfile->ei.deprecated_entry_file_highpc = SYMBOL_VALUE_ADDRESS (m + 1);
- }
- }
-
do_cleanups (back_to);
}
Index: objfiles.c
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.c,v
retrieving revision 1.51
diff -p -u -r1.51 objfiles.c
--- objfiles.c 17 Feb 2004 19:37:37 -0000 1.51
+++ objfiles.c 4 May 2004 15:04:20 -0000
@@ -250,8 +250,6 @@ init_entry_point_info (struct objfile *o
/* Examination of non-executable.o files. Short-circuit this stuff. */
objfile->ei.entry_point = INVALID_ENTRY_POINT;
}
- objfile->ei.deprecated_entry_file_lowpc = INVALID_ENTRY_LOWPC;
- objfile->ei.deprecated_entry_file_highpc = INVALID_ENTRY_HIGHPC;
objfile->ei.entry_func_lowpc = INVALID_ENTRY_LOWPC;
objfile->ei.entry_func_highpc = INVALID_ENTRY_HIGHPC;
objfile->ei.main_func_lowpc = INVALID_ENTRY_LOWPC;
@@ -655,12 +653,6 @@ objfile_relocate (struct objfile *objfil
{
objfile->ei.entry_func_lowpc += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
objfile->ei.entry_func_highpc += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
- }
-
- if (objfile->ei.deprecated_entry_file_lowpc != INVALID_ENTRY_LOWPC)
- {
- objfile->ei.deprecated_entry_file_lowpc += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
- objfile->ei.deprecated_entry_file_highpc += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
}
if (objfile->ei.main_func_lowpc != INVALID_ENTRY_LOWPC)
Index: objfiles.h
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.h,v
retrieving revision 1.36
diff -p -u -r1.36 objfiles.h
--- objfiles.h 30 Apr 2004 20:44:58 -0000 1.36
+++ objfiles.h 4 May 2004 15:04:20 -0000
@@ -44,9 +44,8 @@ struct objfile_data;
to the user executable's recorded entry point, as if the call had been made
directly by the kernel.
- The traditional gdb method of using this info is to use the
- recorded entry point to set the variables
- deprecated_entry_file_lowpc and deprecated_entry_file_highpc from
+ The traditional gdb method of using this info was to use the
+ recorded entry point to set the entry-file's lowpc and highpc from
the debugging information, where these values are the starting
address (inclusive) and ending address (exclusive) of the
instruction space in the executable which correspond to the
@@ -116,12 +115,6 @@ struct entry_info
CORE_ADDR entry_func_lowpc;
CORE_ADDR entry_func_highpc;
-
- /* Start (inclusive) and end (exclusive) of object file containing the
- entry point. */
-
- CORE_ADDR deprecated_entry_file_lowpc;
- CORE_ADDR deprecated_entry_file_highpc;
/* Start (inclusive) and end (exclusive) of the user code main() function. */