aboutsummaryrefslogtreecommitdiff
path: root/gdb/core.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1992-09-22 07:23:35 +0000
committerJohn Gilmore <gnu@cygnus>1992-09-22 07:23:35 +0000
commit5ee4e16ca776d5dd8c3cdb63489c4da773fd9f5c (patch)
tree41dba7dcc73f2011d300bae0f52ba6c698b38ef0 /gdb/core.c
parentb28d3617236dc9959a7b21ddd4437adcb0468226 (diff)
downloadgdb-5ee4e16ca776d5dd8c3cdb63489c4da773fd9f5c.zip
gdb-5ee4e16ca776d5dd8c3cdb63489c4da773fd9f5c.tar.gz
gdb-5ee4e16ca776d5dd8c3cdb63489c4da773fd9f5c.tar.bz2
Break the thread of control that implies that a unix child
process will be the default target. * target.c (find_default_run_target, find_default_attach, find_default_create_inferior, return_zero): new functions. (cleanup_target): Make return_zero the default for to_can_run. * exec.c (exec_ops), core.c (core_ops): Replace child_attach and child_create_inferior references with find_default_XXX instead. * target.h (struct target_ops): new field, to_can_run. (find_default_attach, find_default_create_inferior): new prototypes. (target_can_run): new macro. * Also added a zero (default) to_can_run element to all static struct target_ops initializations throughout GDB, except: * inftarg.c (child_ops): Use new child_can_run() to enable child runs. * infrun.c (child_create_inferior): Clean up error handling when no exec file is specified. (child_attach): Don't require exec file.
Diffstat (limited to 'gdb/core.c')
-rw-r--r--gdb/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/core.c b/gdb/core.c
index dc2cf24..21990f0 100644
--- a/gdb/core.c
+++ b/gdb/core.c
@@ -433,14 +433,15 @@ struct target_ops core_ops = {
"core", "Local core dump file",
"Use a core file as a target. Specify the filename of the core file.",
core_open, core_close,
- child_attach, core_detach, 0, 0, /* resume, wait */
+ find_default_attach, core_detach, 0, 0, /* resume, wait */
get_core_registers,
0, 0, /* store_regs, prepare_to_store */
xfer_memory, core_files_info,
0, 0, /* core_insert_breakpoint, core_remove_breakpoint, */
0, 0, 0, 0, 0, /* terminal stuff */
0, 0, 0, /* kill, load, lookup sym */
- child_create_inferior, 0, /* mourn_inferior */
+ find_default_create_inferior, 0, /* mourn_inferior */
+ 0, /* can_run */
core_stratum, 0, /* next */
0, 1, 1, 1, 0, /* all mem, mem, stack, regs, exec */
0, 0, /* section pointers */