diff options
author | K. Richard Pixley <rich@cygnus> | 1992-09-29 21:51:16 +0000 |
---|---|---|
committer | K. Richard Pixley <rich@cygnus> | 1992-09-29 21:51:16 +0000 |
commit | df9b3bfc4c3c434df5082ef723709ab929d1200b (patch) | |
tree | eef23c1ea733fddf04a10bbc8a1ce6d04ce9aaec /gdb | |
parent | ab96cdfc78bc8376780a3c84de767d06f5e09950 (diff) | |
download | gdb-df9b3bfc4c3c434df5082ef723709ab929d1200b.zip gdb-df9b3bfc4c3c434df5082ef723709ab929d1200b.tar.gz gdb-df9b3bfc4c3c434df5082ef723709ab929d1200b.tar.bz2 |
Break the direct connection from core_file_command to any
particular type of core file support.
* target.h (find_core_target): new prototype.
* target.c (find_core_target): new function. Walks the target
list looking for the core target.
* core.c (core_file_command): replace calls to core_detach and
core_open with find_core_target and direct calls.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 11 | ||||
-rw-r--r-- | gdb/core.c | 11 |
2 files changed, 19 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fd1f3f9..6513826 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,14 @@ +Tue Sep 29 14:35:00 1992 K. Richard Pixley (rich@sendai.cygnus.com) + + Break the direct connection from core_file_command to any + particular type of core file support. + + * target.h (find_core_target): new prototype. + * target.c (find_core_target): new function. Walks the target + list looking for the core target. + * core.c (core_file_command): replace calls to core_detach and + core_open with find_core_target and direct calls. + Tue Sep 29 10:19:00 1992 Ian Lance Taylor (ian@cygnus.com) * xm-hp300hpux.h: define MEM_FNS_DECLARED; include <sys/ptrace.h> @@ -47,12 +47,17 @@ core_file_command (filename, from_tty) char *filename; int from_tty; { + struct target_ops *t; dont_repeat (); /* Either way, seems bogus. */ - if (!filename) - core_detach (filename, from_tty); + t = find_core_target (); + if (t != NULL) + if (!filename) + (t->to_detach) (filename, from_tty); + else + (t->to_open) (filename, from_tty); else - core_open (filename, from_tty); + error ("unimplemented: core files"); } |