This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch;obish?] Delete entry_func_*pc
- From: Andrew Cagney <cagney at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Tue, 15 Jun 2004 13:42:48 -0400
- Subject: [patch;obish?] Delete entry_func_*pc
Hello,
This patch replaces the checks for a pc within [entry_func_lowpc,
entry_func_highpc) in legacy_frame_chain_valid with a call to
inside_entry_func.
Since those were the only uses of entry_func_lowpc and
entry_func_highpc, it follows the change up by garbage collecting those
fields (and the code setting them).
I'll leave this sit for a few days,
Andrew
2004-06-15 Andrew Cagney <cagney@gnu.org>
* objfiles.h (struct entry_info): Delete entry_func_lowpc and
entry_func_highpc fields.
* objfiles.c (init_entry_point_info): Do not clear
entry_func_lowpc and entry_func_highpc.
(objfile_relocate): Do not relocate entry_func_lowpc and
entry_func_highpc.
* dwarfread.c (read_func_scope): Do not set entry_func_lowpc and
entry_func_highpc.
* dwarf2read.c (read_func_scope): Do not set entry_func_lowpc and
entry_func_highpc.
* blockframe.c (legacy_frame_chain_valid): Replace tests against
entry_func_lowpc and entry_func_highpc with call to
inside_entry_func.
Index: blockframe.c
===================================================================
RCS file: /cvs/src/src/gdb/blockframe.c,v
retrieving revision 1.102
diff -p -u -r1.102 blockframe.c
--- blockframe.c 11 Jun 2004 00:41:56 -0000 1.102
+++ blockframe.c 15 Jun 2004 17:38:05 -0000
@@ -524,9 +524,7 @@ legacy_frame_chain_valid (CORE_ADDR fp,
/* If we're already inside the entry function for the main objfile,
then it isn't valid. */
- if (symfile_objfile != NULL
- && (symfile_objfile->ei.entry_func_lowpc <= get_frame_pc (fi)
- && symfile_objfile->ei.entry_func_highpc > get_frame_pc (fi)))
+ if (inside_entry_func (fi))
return 0;
return 1;
Index: dwarf2read.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarf2read.c,v
retrieving revision 1.153
diff -p -u -r1.153 dwarf2read.c
--- dwarf2read.c 15 Jun 2004 01:04:19 -0000 1.153
+++ dwarf2read.c 15 Jun 2004 17:38:06 -0000
@@ -2504,13 +2504,6 @@ read_func_scope (struct die_info *die, s
/* Record the function range for dwarf_decode_lines. */
add_to_cu_func_list (name, lowpc, highpc, cu);
- if (objfile->ei.entry_point >= lowpc &&
- objfile->ei.entry_point < highpc)
- {
- objfile->ei.entry_func_lowpc = lowpc;
- objfile->ei.entry_func_highpc = highpc;
- }
-
new = push_context (0, lowpc);
new->name = new_symbol (die, die->type, cu);
Index: dwarfread.c
===================================================================
RCS file: /cvs/src/src/gdb/dwarfread.c,v
retrieving revision 1.39
diff -p -u -r1.39 dwarfread.c
--- dwarfread.c 7 May 2004 14:29:33 -0000 1.39
+++ dwarfread.c 15 Jun 2004 17:38:06 -0000
@@ -1792,12 +1792,6 @@ read_func_scope (struct dieinfo *dip, ch
return;
}
- if (objfile->ei.entry_point >= dip->at_low_pc &&
- objfile->ei.entry_point < dip->at_high_pc)
- {
- objfile->ei.entry_func_lowpc = dip->at_low_pc;
- objfile->ei.entry_func_highpc = dip->at_high_pc;
- }
new = push_context (0, dip->at_low_pc);
new->name = new_symbol (dip, objfile);
list_in_scope = &local_symbols;
Index: objfiles.c
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.c,v
retrieving revision 1.52
diff -p -u -r1.52 objfiles.c
--- objfiles.c 7 May 2004 14:29:34 -0000 1.52
+++ objfiles.c 15 Jun 2004 17:38:06 -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.entry_func_lowpc = INVALID_ENTRY_LOWPC;
- objfile->ei.entry_func_highpc = INVALID_ENTRY_HIGHPC;
objfile->ei.main_func_lowpc = INVALID_ENTRY_LOWPC;
objfile->ei.main_func_highpc = INVALID_ENTRY_HIGHPC;
}
@@ -649,12 +647,6 @@ objfile_relocate (struct objfile *objfil
}
}
- if (objfile->ei.entry_func_lowpc != INVALID_ENTRY_LOWPC)
- {
- 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.main_func_lowpc != INVALID_ENTRY_LOWPC)
{
objfile->ei.main_func_lowpc += ANOFFSET (delta, SECT_OFF_TEXT (objfile));
Index: objfiles.h
===================================================================
RCS file: /cvs/src/src/gdb/objfiles.h,v
retrieving revision 1.37
diff -p -u -r1.37 objfiles.h
--- objfiles.h 7 May 2004 14:29:34 -0000 1.37
+++ objfiles.h 15 Jun 2004 17:38:06 -0000
@@ -110,12 +110,6 @@ struct entry_info
#define INVALID_ENTRY_POINT (~0) /* ~0 will not be in any file, we hope. */
- /* Start (inclusive) and end (exclusive) of function containing the
- entry point. */
-
- CORE_ADDR entry_func_lowpc;
- CORE_ADDR entry_func_highpc;
-
/* Start (inclusive) and end (exclusive) of the user code main() function. */
CORE_ADDR main_func_lowpc;