diff options
Diffstat (limited to 'gdb/remote.c')
-rw-r--r-- | gdb/remote.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/gdb/remote.c b/gdb/remote.c index 291b7c6..b75d9a9 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -4107,7 +4107,7 @@ remote_target::get_offsets () int lose, num_segments = 0, do_sections, do_segments; CORE_ADDR text_addr, data_addr, bss_addr, segments[2]; - if (symfile_objfile == NULL) + if (current_program_space->symfile_object_file == NULL) return; putpkt ("qOffsets"); @@ -4183,10 +4183,10 @@ remote_target::get_offsets () else if (*ptr != '\0') warning (_("Target reported unsupported offsets: %s"), buf); - section_offsets offs = symfile_objfile->section_offsets; + objfile *objf = current_program_space->symfile_object_file; + section_offsets offs = objf->section_offsets; - symfile_segment_data_up data - = get_symfile_segment_data (symfile_objfile->obfd); + symfile_segment_data_up data = get_symfile_segment_data (objf->obfd); do_segments = (data != NULL); do_sections = num_segments == 0; @@ -4221,7 +4221,7 @@ remote_target::get_offsets () if (do_segments) { - int ret = symfile_map_offsets_to_segments (symfile_objfile->obfd, + int ret = symfile_map_offsets_to_segments (objf->obfd, data.get (), offs, num_segments, segments); @@ -4235,18 +4235,18 @@ remote_target::get_offsets () if (do_sections) { - offs[SECT_OFF_TEXT (symfile_objfile)] = text_addr; + offs[SECT_OFF_TEXT (objf)] = 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[SECT_OFF_DATA (symfile_objfile)] = data_addr; - offs[SECT_OFF_BSS (symfile_objfile)] = data_addr; + offs[SECT_OFF_DATA (objf)] = data_addr; + offs[SECT_OFF_BSS (objf)] = data_addr; } - objfile_relocate (symfile_objfile, offs); + objfile_relocate (objf, offs); } /* Send interrupt_sequence to remote target. */ @@ -4846,7 +4846,8 @@ remote_target::start_remote (int from_tty, int extended_p) /* If we connected to a live target, do some additional setup. */ if (target_has_execution ()) { - if (symfile_objfile) /* No use without a symbol-file. */ + /* No use without a symbol-file. */ + if (current_program_space->symfile_object_file) remote_check_symbols (); } @@ -5983,7 +5984,7 @@ extended_remote_target::post_attach (int pid) binary is not using shared libraries, the vsyscall page is not present (on Linux) and the binary itself hadn't changed since the debugging process was started. */ - if (symfile_objfile != NULL) + if (current_program_space->symfile_object_file != NULL) remote_check_symbols(); } |