aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote-vx.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1994-10-20 05:15:46 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1994-10-20 05:15:46 +0000
commit3a47045432484224045297da5e3254941c93b071 (patch)
treeb610063b08829f46eb73649728d94856ee17c9b8 /gdb/remote-vx.c
parent459877ea9d6bf27d5f7337e2155fb33c0bd996b0 (diff)
downloadfsf-binutils-gdb-3a47045432484224045297da5e3254941c93b071.zip
fsf-binutils-gdb-3a47045432484224045297da5e3254941c93b071.tar.gz
fsf-binutils-gdb-3a47045432484224045297da5e3254941c93b071.tar.bz2
* objfiles.c (objfile_relocate): When relocating ->sections, use
objfile not symfile_objfile. * symtab.h, minsyms.c (minsyms_sort): New function. * objfiles.c (objfile_relocate): Call it. * remote-vx.c (vx_add_symbols): Call breakpoint_re_set. * objfiles.c, objfiles.h (objfile_to_front): New function. * remote-vx.c (vx_add_symbols): Call it. * coffread.c (coff_symtab_read): Handle common symbols the same way that partial-stab.h does.
Diffstat (limited to 'gdb/remote-vx.c')
-rw-r--r--gdb/remote-vx.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c
index 8f0c2d4..239ad24 100644
--- a/gdb/remote-vx.c
+++ b/gdb/remote-vx.c
@@ -669,7 +669,15 @@ vx_add_symbols (name, from_tty, text_addr, data_addr, bss_addr)
struct objfile *objfile;
struct find_sect_args ss;
+ /* It might be nice to suppress the breakpoint_re_set which happens here
+ because we are going to do one again after the objfile_relocate. */
objfile = symbol_file_add (name, from_tty, 0, 0, 0, 0);
+
+ /* This is a (slightly cheesy) way of superceding the old symbols. A less
+ cheesy way would be to find the objfile with the same name and
+ free_objfile it. */
+ objfile_to_front (objfile);
+
offs = (struct section_offsets *)
alloca (sizeof (struct section_offsets)
+ objfile->num_sections * sizeof (offs->offsets));
@@ -687,6 +695,9 @@ vx_add_symbols (name, from_tty, text_addr, data_addr, bss_addr)
ANOFFSET (offs, SECT_OFF_DATA) = data_addr - ss.data_start;
ANOFFSET (offs, SECT_OFF_BSS) = bss_addr - ss.bss_start;
objfile_relocate (objfile, offs);
+
+ /* Need to do this *after* things are relocated. */
+ breakpoint_re_set ();
}
/* This function allows the addition of incrementally linked object files. */