diff options
author | John Gilmore <gnu@cygnus> | 1992-09-22 07:23:35 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-09-22 07:23:35 +0000 |
commit | 5ee4e16ca776d5dd8c3cdb63489c4da773fd9f5c (patch) | |
tree | 41dba7dcc73f2011d300bae0f52ba6c698b38ef0 | |
parent | b28d3617236dc9959a7b21ddd4437adcb0468226 (diff) | |
download | gdb-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.
-rw-r--r-- | gdb/ChangeLog | 24 | ||||
-rw-r--r-- | gdb/core.c | 5 | ||||
-rw-r--r-- | gdb/remote-adapt.c | 1 | ||||
-rw-r--r-- | gdb/remote-eb.c | 1 | ||||
-rw-r--r-- | gdb/remote-es1800.c | 2 | ||||
-rw-r--r-- | gdb/remote-hms.c | 1 | ||||
-rw-r--r-- | gdb/remote-mm.c | 1 | ||||
-rw-r--r-- | gdb/remote-nindy.c | 1 | ||||
-rw-r--r-- | gdb/remote-st2000.c | 1 | ||||
-rw-r--r-- | gdb/remote-udi.c | 1 | ||||
-rw-r--r-- | gdb/remote-vx.c | 2 | ||||
-rw-r--r-- | gdb/xcoffexec.c | 1 |
12 files changed, 39 insertions, 2 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 27276ef..84c17c2 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,27 @@ +Mon Sep 21 18:16:30 1992 K. Richard Pixley (rich@sendai.cygnus.com) + + 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. + Mon Sep 21 19:43:13 1992 John Gilmore and K. Richard Pixley (gnu@cygnus.com) Remove kill_inferior_fast, in favor of target_kill, which goes @@ -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 */ diff --git a/gdb/remote-adapt.c b/gdb/remote-adapt.c index f8a3271..9241573 100644 --- a/gdb/remote-adapt.c +++ b/gdb/remote-adapt.c @@ -1425,6 +1425,7 @@ struct target_ops adapt_ops = { 0, /* lookup_symbol */ adapt_create_inferior, /* create_inferior */ adapt_mourn, /* mourn_inferior FIXME */ + 0, /* can_run */ process_stratum, 0, /* next */ 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */ 0,0, /* Section pointers */ diff --git a/gdb/remote-eb.c b/gdb/remote-eb.c index 575f7cc..666de4f 100644 --- a/gdb/remote-eb.c +++ b/gdb/remote-eb.c @@ -987,6 +987,7 @@ executable as it exists on the remote computer. For example,\n\ 0, /* lookup_symbol */ eb_create_inferior, eb_mourn_inferior, + 0, /* can_run */ process_stratum, 0, /* next */ 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */ 0, 0, /* Section pointers */ diff --git a/gdb/remote-es1800.c b/gdb/remote-es1800.c index 9a542e0..ca806b2 100644 --- a/gdb/remote-es1800.c +++ b/gdb/remote-es1800.c @@ -2187,6 +2187,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).", NULL, /* to_lookup_symbol */ es1800_create_inferior, /* to_create_inferior */ NULL, /* to_mourn_inferior */ + 0, /* to_can_run */ core_stratum, /* to_stratum */ 0, /* to_next */ 0, /* to_has_all_memory */ @@ -2232,6 +2233,7 @@ Specify the serial device it is connected to (e.g. /dev/ttya).", NULL, /* to_lookup_symbol */ es1800_create_inferior, /* to_create_inferior */ es1800_mourn_inferior, /* to_mourn_inferior */ + 0, /* to_can_run */ process_stratum, /* to_stratum */ 0, /* to_next */ 1, /* to_has_all_memory */ diff --git a/gdb/remote-hms.c b/gdb/remote-hms.c index 7b0e7b0..fc260f1 100644 --- a/gdb/remote-hms.c +++ b/gdb/remote-hms.c @@ -1405,6 +1405,7 @@ by a serial line.", 0, /* lookup_symbol */ hms_create_inferior, /* create_inferior */ hms_mourn, /* mourn_inferior FIXME */ + 0, /* can_run */ process_stratum, 0, /* next */ 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */ 0,0, /* Section pointers */ diff --git a/gdb/remote-mm.c b/gdb/remote-mm.c index d824d25..fb9060b 100644 --- a/gdb/remote-mm.c +++ b/gdb/remote-mm.c @@ -1683,6 +1683,7 @@ struct target_ops mm_ops = { 0, /* lookup_symbol */ mm_create_inferior, /* create_inferior */ mm_mourn, /* mourn_inferior FIXME */ + 0, /* can_run */ process_stratum, 0, /* next */ 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */ 0,0, /* sections, sections_end */ diff --git a/gdb/remote-nindy.c b/gdb/remote-nindy.c index dcc552a..69849fc 100644 --- a/gdb/remote-nindy.c +++ b/gdb/remote-nindy.c @@ -941,6 +941,7 @@ specified when you started GDB.", 0, /* lookup_symbol */ nindy_create_inferior, nindy_mourn_inferior, + 0, /* can_run */ process_stratum, 0, /* next */ 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */ 0, 0, /* Section pointers */ diff --git a/gdb/remote-st2000.c b/gdb/remote-st2000.c index f7904fa..d7de930 100644 --- a/gdb/remote-st2000.c +++ b/gdb/remote-st2000.c @@ -795,6 +795,7 @@ the speed to connect at in bits per second.", 0, /* lookup_symbol */ st2000_create_inferior, st2000_mourn_inferior, + 0, /* can_run */ process_stratum, 0, /* next */ 1, diff --git a/gdb/remote-udi.c b/gdb/remote-udi.c index bac27aa..c54ef66 100644 --- a/gdb/remote-udi.c +++ b/gdb/remote-udi.c @@ -1342,6 +1342,7 @@ static struct target_ops udi_ops = { 0, /* lookup_symbol */ udi_create_inferior, /* create_inferior */ udi_mourn, /* mourn_inferior FIXME */ + 0, /* can_run */ process_stratum, 0, /* next */ 1, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */ 0, 0, /* Section pointers */ diff --git a/gdb/remote-vx.c b/gdb/remote-vx.c index de9aa65..39644f3 100644 --- a/gdb/remote-vx.c +++ b/gdb/remote-vx.c @@ -1339,6 +1339,7 @@ Specify the name of the machine to connect to.", vx_load_command, vx_lookup_symbol, vx_create_inferior, 0, /* mourn_inferior */ + 0, /* can_run */ core_stratum, 0, /* next */ 1, 1, 0, 0, 0, /* all mem, mem, stack, regs, exec */ 0, 0, /* Section pointers */ @@ -1361,6 +1362,7 @@ struct target_ops vx_run_ops = { vx_load_command, vx_lookup_symbol, 0, vx_mourn_inferior, + 0, /* can_run */ process_stratum, 0, /* next */ 0, 1, 1, 1, 1, /* all mem, mem, stack, regs, exec */ /* all_mem is off to avoid spurious msg in "i files" */ diff --git a/gdb/xcoffexec.c b/gdb/xcoffexec.c index ddc1d23..9c85b0c 100644 --- a/gdb/xcoffexec.c +++ b/gdb/xcoffexec.c @@ -999,6 +999,7 @@ Specify the filename of the executable file.", 0, /* lookup sym */ child_create_inferior, 0, /* mourn_inferior */ + 0, /* can_run */ file_stratum, 0, /* next */ 0, 1, 0, 0, 0, /* all mem, mem, stack, regs, exec */ 0, 0, /* section pointers */ |