From 73c1e0a129954a6abedb1071816c769eae068ae9 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Fri, 7 May 2004 14:29:34 +0000 Subject: [PATCH] 2004-05-07 Andrew Cagney * 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. --- gdb/ChangeLog | 12 ++++++++++++ gdb/coffread.c | 7 ------- gdb/dbxread.c | 16 ---------------- gdb/dwarf2read.c | 7 ------- gdb/dwarfread.c | 6 ------ gdb/mdebugread.c | 7 ------- gdb/mipsread.c | 19 ------------------- gdb/objfiles.c | 8 -------- gdb/objfiles.h | 11 ++--------- 9 files changed, 14 insertions(+), 79 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d0ba0b5b3f4..1dc3fd6ad4e 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,15 @@ +2004-05-07 Andrew Cagney + + * 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. + 2004-05-07 Mark Kettenis * infcall.c (_initialize_infcall): Fix typo. diff --git a/gdb/coffread.c b/gdb/coffread.c index 81e78c5f892..474282ce3c1 100644 --- a/gdb/coffread.c +++ b/gdb/coffread.c @@ -385,13 +385,6 @@ complete_symtab (char *name, CORE_ADDR start_addr, unsigned int size) 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, diff --git a/gdb/dbxread.c b/gdb/dbxread.c index efbbf2ac695..e33a7e43c5b 100644 --- a/gdb/dbxread.c +++ b/gdb/dbxread.c @@ -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. */ diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index cdb349b105e..a83a69ccc23 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -2351,13 +2351,6 @@ read_file_scope (struct die_info *die, struct dwarf2_cu *cu) } } - 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) { diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index 1cd8ebeb047..b9fe7d71c4b 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -1893,12 +1893,6 @@ read_file_scope (struct dieinfo *dip, char *thisdie, char *enddie, 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) { diff --git a/gdb/mdebugread.c b/gdb/mdebugread.c index f00cce42253..c0165aba536 100644 --- a/gdb/mdebugread.c +++ b/gdb/mdebugread.c @@ -3601,13 +3601,6 @@ parse_partial_symbols (struct objfile *objfile) 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 diff --git a/gdb/mipsread.c b/gdb/mipsread.c index d0d0b9d699d..80d9375f55a 100644 --- a/gdb/mipsread.c +++ b/gdb/mipsread.c @@ -102,25 +102,6 @@ mipscoff_symfile_read (struct objfile *objfile, int mainline) 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); } diff --git a/gdb/objfiles.c b/gdb/objfiles.c index 61790778d18..a40721e6c17 100644 --- a/gdb/objfiles.c +++ b/gdb/objfiles.c @@ -250,8 +250,6 @@ init_entry_point_info (struct objfile *objfile) /* 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; @@ -657,12 +655,6 @@ objfile_relocate (struct objfile *objfile, struct section_offsets *new_offsets) 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) { objfile->ei.main_func_lowpc += ANOFFSET (delta, SECT_OFF_TEXT (objfile)); diff --git a/gdb/objfiles.h b/gdb/objfiles.h index 3381cb943e2..c2a6a01a1ba 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -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 @@ -117,12 +116,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. */ CORE_ADDR main_func_lowpc;