aboutsummaryrefslogtreecommitdiff
path: root/gdb/hp-psymtab-read.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-05-04 16:52:34 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-05-04 16:52:34 +0000
commitb8fbeb1874605f3dfe03e0b3ced670f6308b95f5 (patch)
treeba47cc4aeefd9f6fd6515a2a4f5fe296511d6bf3 /gdb/hp-psymtab-read.c
parent70d1b0e82047b6bb257d95311fce2689dae98074 (diff)
downloadgdb-b8fbeb1874605f3dfe03e0b3ced670f6308b95f5.zip
gdb-b8fbeb1874605f3dfe03e0b3ced670f6308b95f5.tar.gz
gdb-b8fbeb1874605f3dfe03e0b3ced670f6308b95f5.tar.bz2
Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* objfiles.h (SECT_OFF_DATA, SECT_OFF_TEXT, SECT_OFF_BSS, SECT_OFF_RODATA): Define as functions of OBJFILE. Add sect_index_text, sect_index_data, sect_index_rodata, sect_index_bss to objfile structure. * gdb-stabs.h (SECT_OFF_DATA, SECT_OFF_TEXT, SECT_OFF_BSS, SECT_OFF_RODATA): Remove. * objfiles.c (allocate_objfile): Initialize sect_index_{text,data,bss,rodata} to -1, for error detection. * symfile.c (default_symfile_offsets): Initialize sect_index_{text,data,bss,rodata} from bfd information. * xcoffread.c (xcoff_symfile_offsets): Ditto. * somread.c (som_symfile_offsets): Initialize sect_index_{text,data,bss,rodata}. * coffread.c, dbxread.c, elfread.c, hp-psymtab-read.c, hp-symtab-read.c, hpread.c, mdebugread.c, minsyms.c, mipsread.c, objfiles.c, os9kread.c, pa64solib.c, partial-stab.h, remote-os9k.c, remote-vx.c, remote.c, rs6000-nat.c, somsolib.c, stabsread.c, symfile.c, xcoffread.c: Update use of SECT_OFF_{TEXT,DATA,BSS,RODATA} to depend on the current objfile. * xcoffread.c: Add new field objfile to find_targ_sec_arg.
Diffstat (limited to 'gdb/hp-psymtab-read.c')
-rw-r--r--gdb/hp-psymtab-read.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/gdb/hp-psymtab-read.c b/gdb/hp-psymtab-read.c
index d3d0ff2..3315309 100644
--- a/gdb/hp-psymtab-read.c
+++ b/gdb/hp-psymtab-read.c
@@ -601,7 +601,7 @@ scan_procs (curr_pd_p, qPD, max_procs, start_adr, end_adr, pst, vt_bits, objfile
LOC_BLOCK, /* "I am a routine" */
&objfile->global_psymbols,
(qPD[curr_pd].adrStart + /* Starting address of rtn */
- ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT)),
+ ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))),
0, /* core addr?? */
trans_lang ((enum hp_language) qPD[curr_pd].language),
objfile);
@@ -614,7 +614,7 @@ scan_procs (curr_pd_p, qPD, max_procs, start_adr, end_adr, pst, vt_bits, objfile
LOC_BLOCK, /* "I am a routine" */
&objfile->static_psymbols,
(qPD[curr_pd].adrStart + /* Starting address of rtn */
- ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT)),
+ ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))),
0, /* core addr?? */
trans_lang ((enum hp_language) qPD[curr_pd].language),
objfile);
@@ -1816,7 +1816,7 @@ hpread_build_psymtabs (objfile, mainline)
past_first_source_file = 1;
valu = hpread_get_textlow (i, hp_symnum, objfile, symcount);
- valu += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ valu += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
pst = hpread_start_psymtab (objfile,
namestring, valu,
(hp_symnum
@@ -1850,7 +1850,7 @@ hpread_build_psymtabs (objfile, mainline)
/* Now begin a new module and a new psymtab for it */
SET_NAMESTRING (dn_bufp, &namestring, objfile);
valu = hpread_get_textlow (i, hp_symnum, objfile, symcount);
- valu += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ valu += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
if (!pst)
{
pst = hpread_start_psymtab (objfile,
@@ -1869,11 +1869,11 @@ hpread_build_psymtabs (objfile, mainline)
/* The beginning of a function. DNTT_TYPE_ENTRY may also denote
a secondary entry point. */
valu = dn_bufp->dfunc.hiaddr + ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT);
+ SECT_OFF_TEXT (objfile));
if (valu > texthigh)
texthigh = valu;
valu = dn_bufp->dfunc.lowaddr +
- ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
SET_NAMESTRING (dn_bufp, &namestring, objfile);
if (dn_bufp->dfunc.global)
add_psymbol_to_list (namestring, strlen (namestring),
@@ -1890,11 +1890,11 @@ hpread_build_psymtabs (objfile, mainline)
case DNTT_TYPE_DOC_FUNCTION:
valu = dn_bufp->ddocfunc.hiaddr + ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT);
+ SECT_OFF_TEXT (objfile));
if (valu > texthigh)
texthigh = valu;
valu = dn_bufp->ddocfunc.lowaddr +
- ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
SET_NAMESTRING (dn_bufp, &namestring, objfile);
if (dn_bufp->ddocfunc.global)
add_psymbol_to_list (namestring, strlen (namestring),
@@ -1984,7 +1984,7 @@ hpread_build_psymtabs (objfile, mainline)
valu = dn_bufp->dsvar.location;
/* Relocate in case it's in a shared library */
if (storage == LOC_STATIC)
- valu += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA);
+ valu += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
/* Luckily, dvar, svar, typedef, and tagdef all
have their "global" bit in the same place, so it works
@@ -2208,7 +2208,7 @@ hpread_start_psymtab (objfile,
struct partial_symbol **global_syms;
struct partial_symbol **static_syms;
{
- int offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ int offset = ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
extern void hpread_psymtab_to_symtab ();
struct partial_symtab *result =
start_psymtab_common (objfile, objfile->section_offsets,
@@ -2246,7 +2246,7 @@ hpread_end_psymtab (pst, include_list, num_includes, capping_symbol_offset,
{
int i;
struct objfile *objfile = pst->objfile;
- int offset = ANOFFSET (pst->section_offsets, SECT_OFF_TEXT);
+ int offset = ANOFFSET (pst->section_offsets, SECT_OFF_TEXT (objfile));
#ifdef DUMPING
/* Turn on to see what kind of a psymtab we've built. */