aboutsummaryrefslogtreecommitdiff
path: root/gdb/os9kread.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/os9kread.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/os9kread.c')
-rw-r--r--gdb/os9kread.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/gdb/os9kread.c b/gdb/os9kread.c
index f820fe8..cbc51a7 100644
--- a/gdb/os9kread.c
+++ b/gdb/os9kread.c
@@ -208,7 +208,7 @@ record_minimal_symbol (name, address, type, objfile)
{
case N_TEXT:
ms_type = mst_text;
- address += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ address += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
break;
case N_DATA:
ms_type = mst_data;
@@ -608,7 +608,7 @@ read_os9k_psymtab (objfile, text_addr, text_size)
#ifdef END_OF_TEXT_DEFAULT
end_of_text_addr = END_OF_TEXT_DEFAULT;
#else
- end_of_text_addr = text_addr + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT)
+ end_of_text_addr = text_addr + ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile))
+ text_size; /* Relocate */
#endif
@@ -655,7 +655,7 @@ read_os9k_psymtab (objfile, text_addr, text_size)
continue;
case N_SYM_SE:
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
if (psymfile_depth == 1 && pst)
{
os9k_end_psymtab (pst, psymtab_include_list, includes_used,
@@ -692,7 +692,7 @@ read_os9k_psymtab (objfile, text_addr, text_size)
valu = CUR_SYMBOL_VALUE;
if (valu)
- valu += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ valu += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
past_first_source_file = 1;
p = strchr (namestring, ':');
@@ -884,7 +884,7 @@ read_os9k_psymtab (objfile, text_addr, text_size)
continue;
case 'f':
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
if (pst && pst->textlow == 0)
pst->textlow = CUR_SYMBOL_VALUE;
@@ -895,7 +895,7 @@ read_os9k_psymtab (objfile, text_addr, text_size)
continue;
case 'F':
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
if (pst && pst->textlow == 0)
pst->textlow = CUR_SYMBOL_VALUE;
@@ -933,7 +933,7 @@ read_os9k_psymtab (objfile, text_addr, text_size)
}
case N_SYM_RBRAC:
- CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT);
+ CUR_SYMBOL_VALUE += ANOFFSET (objfile->section_offsets, SECT_OFF_TEXT (objfile));
#ifdef HANDLE_RBRAC
HANDLE_RBRAC (CUR_SYMBOL_VALUE);
continue;
@@ -1423,7 +1423,7 @@ os9k_read_ofile_symtab (pst)
which comes from pst->textlow is correct. */
if (last_source_start_addr == 0)
last_source_start_addr = text_offset;
- pst->symtab = end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT);
+ pst->symtab = end_symtab (text_offset + text_size, objfile, SECT_OFF_TEXT (objfile));
end_stabs ();
}
@@ -1473,12 +1473,12 @@ os9k_process_one_symbol (type, desc, valu, name, section_offsets, objfile)
case N_SYM_LBRAC:
/* On most machines, the block addresses are relative to the
N_SO, the linker did not relocate them (sigh). */
- valu += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
new = push_context (desc, valu);
break;
case N_SYM_RBRAC:
- valu += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
new = pop_context ();
#if !defined (OS9K_VARIABLES_INSIDE_BLOCK)
@@ -1547,7 +1547,7 @@ os9k_process_one_symbol (type, desc, valu, name, section_offsets, objfile)
one line-number -- core-address correspondence.
Enter it in the line list for this symbol table. */
/* Relocate for dynamic loading and for ELF acc fn-relative syms. */
- valu += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
/* FIXME: loses if sizeof (char *) > sizeof (int) */
record_line (current_subfile, (int) name, valu);
break;
@@ -1570,7 +1570,7 @@ os9k_process_one_symbol (type, desc, valu, name, section_offsets, objfile)
switch (deftype)
{
case 'S':
- valu += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
n = strrchr (name, '/');
if (n != NULL)
{
@@ -1588,7 +1588,7 @@ os9k_process_one_symbol (type, desc, valu, name, section_offsets, objfile)
{
if (last_source_file)
{
- end_symtab (valu, objfile, SECT_OFF_TEXT);
+ end_symtab (valu, objfile, SECT_OFF_TEXT (objfile));
end_stabs ();
}
start_stabs ();
@@ -1605,7 +1605,7 @@ os9k_process_one_symbol (type, desc, valu, name, section_offsets, objfile)
case 'f':
case 'F':
- valu += ANOFFSET (section_offsets, SECT_OFF_TEXT);
+ valu += ANOFFSET (section_offsets, SECT_OFF_TEXT (objfile));
function_stab_type = type;
within_function = 1;
@@ -1615,7 +1615,7 @@ os9k_process_one_symbol (type, desc, valu, name, section_offsets, objfile)
case 'V':
case 'v':
- valu += ANOFFSET (section_offsets, SECT_OFF_DATA);
+ valu += ANOFFSET (section_offsets, SECT_OFF_DATA (objfile));
define_symbol (valu, name, desc, type, objfile);
break;