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/target.h | |
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/target.h')
-rw-r--r-- | gdb/target.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gdb/target.h b/gdb/target.h index 3ed9f8b..4a680b1 100644 --- a/gdb/target.h +++ b/gdb/target.h @@ -80,6 +80,7 @@ struct target_ops int (*to_lookup_symbol) PARAMS ((char *, CORE_ADDR *)); void (*to_create_inferior) PARAMS ((char *, char *, char **)); void (*to_mourn_inferior) PARAMS ((void)); + int (*to_can_run) PARAMS ((void)); enum strata to_stratum; struct target_ops *to_next; @@ -128,7 +129,13 @@ extern struct target_ops *current_target; #define target_close(quitting) \ (*current_target->to_close) (quitting) -/* Attaches to a process on the target side. */ +/* Attaches to a process on the target side. Arguments are as passed + to the `attach' command by the user. This routine can be called + when the target is not on the target-stack, if the target_can_run + routine returns 1; in that case, it must push itself onto the stack. + Upon exit, the target should be ready for normal operations, and + should be ready to deliver the status of the process immediately + (without waiting) to an upcoming target_wait call. */ #define target_attach(args, from_tty) \ (*current_target->to_attach) (args, from_tty) @@ -299,6 +306,11 @@ print_section_info PARAMS ((struct target_ops *, bfd *)); #define target_mourn_inferior() \ (*current_target->to_mourn_inferior) () +/* Does target have enough data to do a run or attach command? */ + +#define target_can_run(t) \ + ((t)->to_can_run) () + /* Pointer to next target in the chain, e.g. a core file and an exec file. */ #define target_next \ @@ -394,4 +406,10 @@ memory_insert_breakpoint PARAMS ((CORE_ADDR, char *)); void noprocess PARAMS ((void)); +void +find_default_attach PARAMS ((char *, int)); + +void +find_default_create_inferior PARAMS ((char *, char *, char **)); + #endif /* !defined (TARGET_H) */ |