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);
}
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);
unpush_target (target);
- remote_dcache = dcache_init (remote_read_bytes, remote_write_bytes);
+ if (!remote_dcache)
+ remote_dcache = dcache_init (remote_read_bytes, remote_write_bytes);
+ else
+ dcache_flush (remote_dcache);
remote_desc = SERIAL_OPEN (name);
if (!remote_desc)
unpush_target (&remote_cisco_ops);
- remote_dcache = dcache_init (remote_read_bytes, remote_write_bytes);
+ if (!remote_dcache)
+ remote_dcache = dcache_init (remote_read_bytes, remote_write_bytes);
+ else
+ dcache_flush (remote_dcache);
remote_desc = SERIAL_OPEN (name);
if (!remote_desc)