summaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-08-07 15:16:15 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2000-08-07 15:16:15 +0000
commit90de6394c32139cb88650b15d0570d54e1246e96 (patch)
treeca4954ec8dd44a04e7ffe35e723cd7d1aa64f558 /gdb/remote.c
parent62504dc330152a23dd4a49e063faea3605008c28 (diff)
downloadgdb-90de6394c32139cb88650b15d0570d54e1246e96.tar.gz
2000-08-07 Elena Zannoni <ezannoni@kwikemart.cygnus.com>
* objfiles.h (SECT_OFF_BSS): Don't detect invalid sect_index_bss here, let the users of the macro do it. * symtab.h (ANOFFSET): Detect here if the section index is not initialized. * xcoffread.c (find_targ_sec): Don't treat .bss as special, because some objfiles may not have that section at all. * coffread.c (cs_to_section): Ditto. * elfread.c (elf_symtab_read): Detect an uninitialized index value. (elfstab_offset_sections): The macro ANOFFSET cannot be used as an lvalue anymore. * remote.c (get_offsets, remote_cisco_objfile_relocate): Don't use ANOFFSET as an lvalue. * objfiles.c (objfile_relocate, objfile_relocate): Don't use ANOFFSET as an lvalue. * symfile.c (default_symfile_offsets): Don't use ANOFFSET as an lvalue.
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 8c3d694565c..9fe2a29ed10 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1835,14 +1835,14 @@ get_offsets (void)
offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
- ANOFFSET (offs, SECT_OFF_TEXT (symfile_objfile)) = text_addr;
+ offs->offsets[SECT_OFF_TEXT (symfile_objfile)] = text_addr;
/* This is a temporary kludge to force data and bss to use the same offsets
because that's what nlmconv does now. The real solution requires changes
to the stub and remote.c that I don't have time to do right now. */
- ANOFFSET (offs, SECT_OFF_DATA (symfile_objfile)) = data_addr;
- ANOFFSET (offs, SECT_OFF_BSS (symfile_objfile)) = data_addr;
+ offs->offsets[SECT_OFF_DATA (symfile_objfile)] = data_addr;
+ offs->offsets[SECT_OFF_BSS (symfile_objfile)] = data_addr;
objfile_relocate (symfile_objfile, offs);
}
@@ -1948,9 +1948,9 @@ remote_cisco_objfile_relocate (bfd_signed_vma text_off, bfd_signed_vma data_off,
offs = (struct section_offsets *) alloca (SIZEOF_SECTION_OFFSETS);
memcpy (offs, symfile_objfile->section_offsets, SIZEOF_SECTION_OFFSETS);
- ANOFFSET (offs, SECT_OFF_TEXT (symfile_objfile)) = text_off;
- ANOFFSET (offs, SECT_OFF_DATA (symfile_objfile)) = data_off;
- ANOFFSET (offs, SECT_OFF_BSS (symfile_objfile)) = bss_off;
+ offs->offsets[SECT_OFF_TEXT (symfile_objfile)] = text_off;
+ offs->offsets[SECT_OFF_DATA (symfile_objfile)] = data_off;
+ offs->offsets[SECT_OFF_BSS (symfile_objfile)] = bss_off;
/* First call the standard objfile_relocate. */
objfile_relocate (symfile_objfile, offs);