diff options
author | John Gilmore <gnu@cygnus> | 1992-09-26 05:20:24 +0000 |
---|---|---|
committer | John Gilmore <gnu@cygnus> | 1992-09-26 05:20:24 +0000 |
commit | 836e343b0145663c08f87d6e0cfdf2d43c493e53 (patch) | |
tree | 883564408f42536453ff73dc8981066a5554a830 /gdb/inftarg.c | |
parent | 218ce930302dc328a7e6740d064ce38ffe76f0c8 (diff) | |
download | gdb-836e343b0145663c08f87d6e0cfdf2d43c493e53.zip gdb-836e343b0145663c08f87d6e0cfdf2d43c493e53.tar.gz gdb-836e343b0145663c08f87d6e0cfdf2d43c493e53.tar.bz2 |
Split non-target-dependent code out of target_attach routines.
* target.h: Comments on target_attach args and results.
* infcmd.c (attach_command): Check for existing execution, call
target_attach, set up terminal status and wait_for_inferior, wait
for the attach status, and do normal_stop.
* inftarg.c (child_attach): Remove target independent stuff.
* remote-adapt.c (adapt_attach): Ditto.
* remote-mm.c (mm_attach): Ditto.
* remote-udi.c (udi_attach): Ditto.
* remote-vx.c (vx_attach): Ditto.
Cleanup.
* remote-hms.c (hms_attach): Remove completely, it was useless.
* remote-mm.c, remote-hms.c, remote-udi.c, remote-adapt.c: Remove
commented-out start_remote calls.
* remote-hms.c, remote-adapt.c, remote-mm.c, remote-udi.c: Remove
DENTER and DEXIT macros and their calls. Use a real debugger --
like gdb -- to see what functions are being called when.
Diffstat (limited to 'gdb/inftarg.c')
-rw-r--r-- | gdb/inftarg.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/gdb/inftarg.c b/gdb/inftarg.c index 5717408..e357c0e 100644 --- a/gdb/inftarg.c +++ b/gdb/inftarg.c @@ -94,8 +94,7 @@ child_wait (status) } -/* Attach to process PID, then initialize for debugging it - and wait for the trace-trap that results from attaching. */ +/* Attach to process PID, then initialize for debugging it. */ static void child_attach (args, from_tty) @@ -105,8 +104,6 @@ child_attach (args, from_tty) char *exec_file; int pid; - dont_repeat(); - if (!args) error_no_arg ("process-id to attach"); @@ -118,14 +115,6 @@ child_attach (args, from_tty) if (pid == getpid()) /* Trying to masturbate? */ error ("I refuse to debug myself!"); - if (target_has_execution) - { - if (query ("A program is being debugged already. Kill it? ")) - target_kill (); - else - error ("Inferior not killed."); - } - if (from_tty) { exec_file = (char *) get_exec_file (0); @@ -141,18 +130,6 @@ child_attach (args, from_tty) attach (pid); inferior_pid = pid; push_target (&child_ops); - - mark_breakpoints_out (); - target_terminal_init (); - clear_proceed_status (); - stop_soon_quietly = 1; - /*proceed (-1, 0, -2);*/ - target_terminal_inferior (); - wait_for_inferior (); -#ifdef SOLIB_ADD - SOLIB_ADD ((char *)0, from_tty, (struct target_ops *)0); -#endif - normal_stop (); #endif /* ATTACH_DETACH */ } |