X-Git-Url: https://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fremote.c;h=082499e6e84644aa3c20d34d6b678f7c343186ae;hb=6a053cb1ff643cec3349d7f2f47ae5573f82d613;hp=7923be1d2fca294f311a8a93643a3d47e04cb989;hpb=456e800a63def18484f69a51f59c2338a5cc4568;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/remote.c b/gdb/remote.c index 7923be1d2f..082499e6e8 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -4049,7 +4049,6 @@ remote_target::get_offsets () char *ptr; int lose, num_segments = 0, do_sections, do_segments; CORE_ADDR text_addr, data_addr, bss_addr, segments[2]; - struct section_offsets *offs; struct symfile_segment_data *data; if (symfile_objfile == NULL) @@ -4128,10 +4127,7 @@ remote_target::get_offsets () else if (*ptr != '\0') warning (_("Target reported unsupported offsets: %s"), buf); - offs = ((struct section_offsets *) - alloca (SIZEOF_N_SECTION_OFFSETS (symfile_objfile->num_sections))); - memcpy (offs, symfile_objfile->section_offsets, - SIZEOF_N_SECTION_OFFSETS (symfile_objfile->num_sections)); + section_offsets offs = symfile_objfile->section_offsets; data = get_symfile_segment_data (symfile_objfile->obfd); do_segments = (data != NULL); @@ -4184,15 +4180,15 @@ remote_target::get_offsets () if (do_sections) { - offs->offsets[SECT_OFF_TEXT (symfile_objfile)] = text_addr; + offs[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. */ - offs->offsets[SECT_OFF_DATA (symfile_objfile)] = data_addr; - offs->offsets[SECT_OFF_BSS (symfile_objfile)] = data_addr; + offs[SECT_OFF_DATA (symfile_objfile)] = data_addr; + offs[SECT_OFF_BSS (symfile_objfile)] = data_addr; } objfile_relocate (symfile_objfile, offs);