aboutsummaryrefslogtreecommitdiff
path: root/gdb/core.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1991-04-23 00:05:24 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1991-04-23 00:05:24 +0000
commitd0237a54e516a4e6aba631a63c689880fdf008eb (patch)
tree44eab2a099a2d71c8940965ec6acc449a19b740f /gdb/core.c
parent192cbba9440ddf2171363ae74028d3f279c83b1c (diff)
downloadgdb-d0237a54e516a4e6aba631a63c689880fdf008eb.zip
gdb-d0237a54e516a4e6aba631a63c689880fdf008eb.tar.gz
gdb-d0237a54e516a4e6aba631a63c689880fdf008eb.tar.bz2
* Shared libaray/corefile changes from Peter Schauer:
core.c (core_close): Call CLEAR_SOLIB. (core_open): Remove comment about "should deal with shared lib". (core_xfer_memory): If we can't xfer the usual way, try the shared libraries. solib.c (so_list): New fields so_bfd and so_sections{,_end}. (find_solib): Use solib_map_sections to get ld_text. (solib_map_sections, solib_xfer_memory): New functions. (clear_solib): Free so_sections and close so_bfd. tm-sunos.h: Add solib_xfer_memory, solib_add.
Diffstat (limited to 'gdb/core.c')
-rw-r--r--gdb/core.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/gdb/core.c b/gdb/core.c
index 4f3c617..04192df 100644
--- a/gdb/core.c
+++ b/gdb/core.c
@@ -64,6 +64,9 @@ core_close (quitting)
free (bfd_get_filename (core_bfd));
bfd_close (core_bfd);
core_bfd = NULL;
+#ifdef CLEAR_SOLIB
+ CLEAR_SOLIB ();
+#endif
}
}
@@ -140,7 +143,12 @@ core_open (filename, from_tty)
set_current_frame ( create_new_frame (read_register (FP_REGNUM),
read_pc ()));
select_frame (get_current_frame (), 0);
- /* FIXME, handle shared library reading here. */
+#if 0
+ /* Shouldn't be necessary to read in symbols. */
+#ifdef SOLIB_ADD
+ SOLIB_ADD (NULL, from_tty);
+#endif
+#endif /* 0 */
print_sel_frame (0); /* Print the top frame and source line */
} else {
printf (
@@ -370,8 +378,14 @@ core_xfer_memory (memaddr, myaddr, len, write)
int len;
int write;
{
- return xfer_memory (memaddr, myaddr, len, write,
+ int res;
+ res = xfer_memory (memaddr, myaddr, len, write,
core_bfd, core_sections, core_sections_end);
+#ifdef SOLIB_XFER_MEMORY
+ if (res == 0)
+ res = SOLIB_XFER_MEMORY (memaddr, myaddr, len, write);
+#endif
+ return res;
}
/* Get the registers out of a core file. This is the machine-