aboutsummaryrefslogtreecommitdiff
path: root/gdb/partial-stab.h
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/partial-stab.h
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/partial-stab.h')
-rw-r--r--gdb/partial-stab.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/gdb/partial-stab.h b/gdb/partial-stab.h
index 9c4be68..b8c9de8 100644
--- a/gdb/partial-stab.h
+++ b/gdb/partial-stab.h
@@ -46,19 +46,19 @@ switch (CUR_SYMBOL_TYPE)
case N_TEXT | N_EXT:
case N_NBTEXT | N_EXT:
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
goto record_it;
case N_DATA | N_EXT:
case N_NBDATA | N_EXT:
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
goto record_it;
case N_BSS:
case N_BSS | N_EXT:
case N_NBBSS | N_EXT:
case N_SETV | N_EXT: /* FIXME, is this in BSS? */
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_BSS);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_BSS (objfile));
goto record_it;
case N_ABS | N_EXT:
@@ -85,7 +85,7 @@ switch (CUR_SYMBOL_TYPE)
case N_FN_SEQ:
case N_TEXT:
#ifdef DBXREAD_ONLY
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
SET_NAMESTRING ();
if ((namestring[0] == '-' && namestring[1] == 'l')
|| (namestring[(nsl = strlen (namestring)) - 1] == 'o'
@@ -121,7 +121,7 @@ switch (CUR_SYMBOL_TYPE)
continue;
case N_DATA:
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
goto record_it;
case N_UNDF | N_EXT:
@@ -203,7 +203,7 @@ switch (CUR_SYMBOL_TYPE)
char *p;
int prev_textlow_not_set;
- valu = CUR_SYMBOL_VALUE + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ valu = CUR_SYMBOL_VALUE + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
prev_textlow_not_set = textlow_not_set;
@@ -423,7 +423,7 @@ switch (CUR_SYMBOL_TYPE)
switch (p[1])
{
case 'S':
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
#ifdef STATIC_TRANSFORM_NAME
namestring = STATIC_TRANSFORM_NAME (namestring);
#endif
@@ -434,7 +434,7 @@ switch (CUR_SYMBOL_TYPE)
psymtab_language, objfile);
continue;
case 'G':
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_DATA (objfile));
/* The addresses in these entries are reported to be
wrong. See the code that reads 'G's for symtabs. */
add_psymbol_to_list (namestring, p - namestring,
@@ -575,7 +575,7 @@ switch (CUR_SYMBOL_TYPE)
continue;
case 'f':
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
#ifdef DBXREAD_ONLY
/* Kludges for ELF/STABS with Sun ACC */
last_function_name = namestring;
@@ -602,7 +602,7 @@ switch (CUR_SYMBOL_TYPE)
if (textlow_not_set
|| (CUR_SYMBOL_VALUE < pst->textlow
&& CUR_SYMBOL_VALUE
- != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT)))
+ != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))))
{
pst->textlow = CUR_SYMBOL_VALUE;
textlow_not_set = 0;
@@ -619,7 +619,7 @@ switch (CUR_SYMBOL_TYPE)
are put into the global psymtab like one would expect.
They're also in the minimal symbol table. */
case 'F':
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
#ifdef DBXREAD_ONLY
/* Kludges for ELF/STABS with Sun ACC */
last_function_name = namestring;
@@ -627,7 +627,7 @@ switch (CUR_SYMBOL_TYPE)
/* Do not fix textlow==0 for .o or NLM files, as 0 is a legit
value for the bottom of the text seg in those cases. */
if (CUR_SYMBOL_VALUE == ANOFFSET (objfile->section_offsets,
- SECT_OFF_TEXT))
+ SECT_OFF_TEXT (objfile)))
CUR_SYMBOL_VALUE =
find_stab_function_addr (namestring, pst->filename, objfile);
if (pst && textlow_not_set)
@@ -649,7 +649,7 @@ switch (CUR_SYMBOL_TYPE)
if (textlow_not_set
|| (CUR_SYMBOL_VALUE < pst->textlow
&& CUR_SYMBOL_VALUE
- != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT)))
+ != ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))))
{
pst->textlow = CUR_SYMBOL_VALUE;
textlow_not_set = 0;