From 5e2e79f859325ef28cbc98c6704a72de847e5711 Mon Sep 17 00:00:00 2001 From: Fred Fish Date: Sat, 21 Mar 1992 01:56:01 +0000 Subject: Many changes, most related to creating entry point information on a per-objfile basis. See comments in objfiles.h and details in ChangeLog. Also remove redundant definitions of FRAME_CHAIN_VALID from most of the tm-* files and use a default definition in frame.h. --- gdb/dwarfread.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) (limited to 'gdb/dwarfread.c') diff --git a/gdb/dwarfread.c b/gdb/dwarfread.c index c74d2db..269a691 100644 --- a/gdb/dwarfread.c +++ b/gdb/dwarfread.c @@ -62,6 +62,7 @@ other things to work on, if you get bored. :-) #include "symtab.h" #include "gdbtypes.h" #include "symfile.h" +#include "objfiles.h" #include "elf/dwarf.h" #include "buildsym.h" @@ -95,12 +96,6 @@ typedef unsigned int DIEREF; /* Reference to a DIE */ /* External variables referenced. */ -extern CORE_ADDR startup_file_start; /* From blockframe.c */ -extern CORE_ADDR startup_file_end; /* From blockframe.c */ -extern CORE_ADDR entry_scope_lowpc; /* From blockframe.c */ -extern CORE_ADDR entry_scope_highpc; /* From blockframe.c */ -extern CORE_ADDR main_scope_lowpc; /* From blockframe.c */ -extern CORE_ADDR main_scope_highpc; /* From blockframe.c */ extern int info_verbose; /* From main.c; nonzero => verbose */ extern char *warning_pre_print; /* From utils.c */ @@ -1439,15 +1434,16 @@ read_func_scope (dip, thisdie, enddie, objfile) { register struct context_stack *new; - if (entry_point >= dip -> at_low_pc && entry_point < dip -> at_high_pc) + if (objfile -> ei.entry_point >= dip -> at_low_pc && + objfile -> ei.entry_point < dip -> at_high_pc) { - entry_scope_lowpc = dip -> at_low_pc; - entry_scope_highpc = dip -> at_high_pc; + objfile -> ei.entry_func_lowpc = dip -> at_low_pc; + objfile -> ei.entry_func_highpc = dip -> at_high_pc; } if (STREQ (dip -> at_name, "main")) /* FIXME: hardwired name */ { - main_scope_lowpc = dip -> at_low_pc; - main_scope_highpc = dip -> at_high_pc; + objfile -> ei.main_func_lowpc = dip -> at_low_pc; + objfile -> ei.main_func_highpc = dip -> at_high_pc; } new = push_context (0, dip -> at_low_pc); new -> name = new_symbol (dip, objfile); @@ -1492,10 +1488,11 @@ read_file_scope (dip, thisdie, enddie, objfile) struct cleanup *back_to; struct symtab *symtab; - if (entry_point >= dip -> at_low_pc && entry_point < dip -> at_high_pc) + if (objfile -> ei.entry_point >= dip -> at_low_pc && + objfile -> ei.entry_point < dip -> at_high_pc) { - startup_file_start = dip -> at_low_pc; - startup_file_end = dip -> at_high_pc; + objfile -> ei.entry_file_lowpc = dip -> at_low_pc; + objfile -> ei.entry_file_highpc = dip -> at_high_pc; } if (dip -> at_producer != NULL) { -- cgit v1.1