* attach& support, and attach "async + sync_execution" support.
@ 2008-03-14 8:05 Pedro Alves
2008-03-14 19:18 ` Daniel Jacobowitz
0 siblings, 1 reply; 6+ messages in thread
From: Pedro Alves @ 2008-03-14 8:05 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 172 bytes --]
This patch adds support for attach&, and for synchronous attach in
sync_execution mode.
The linux native async patch I'll post next will support attach&.
--
Pedro Alves
[-- Attachment #2: attach_async_support.diff --]
[-- Type: text/x-diff, Size: 5154 bytes --]
2008-03-14 Pedro Alves <pedro@codesourcery.com>
* infcmd.c (attach_command_async_continuation): New.
(attach_command): Support background async execution, and async
execution in synchronous mode.
---
gdb/infcmd.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 112 insertions(+), 10 deletions(-)
Index: src/gdb/infcmd.c
===================================================================
--- src.orig/gdb/infcmd.c 2008-03-14 03:58:34.000000000 +0000
+++ src/gdb/infcmd.c 2008-03-14 03:59:37.000000000 +0000
@@ -1852,6 +1852,63 @@ vector_info (char *args, int from_tty)
}
\f
+static void
+attach_command_async_continuation (struct continuation_arg * arg)
+{
+ char *exec_file;
+ char *full_exec_path = NULL;
+
+ char *args;
+ int from_tty;
+
+ args = (char *) arg->data.pointer;
+ from_tty = arg->next->data.integer;
+
+ stop_soon = NO_STOP_QUIETLY;
+
+ /* If no exec file is yet known, try to determine it from the
+ process itself. */
+ exec_file = (char *) get_exec_file (0);
+ if (!exec_file)
+ {
+ exec_file = target_pid_to_exec_file (PIDGET (inferior_ptid));
+ if (exec_file)
+ {
+ /* It's possible we don't have a full path, but rather just a
+ filename. Some targets, such as HP-UX, don't provide the
+ full path, sigh.
+
+ Attempt to qualify the filename against the source path.
+ (If that fails, we'll just fall back on the original
+ filename. Not much more we can do...)
+ */
+ if (!source_full_path_of (exec_file, &full_exec_path))
+ full_exec_path = savestring (exec_file, strlen (exec_file));
+
+ exec_file_attach (full_exec_path, from_tty);
+ symbol_file_add_main (full_exec_path, from_tty);
+ }
+ }
+ else
+ {
+ reopen_exec_file ();
+ reread_symbols ();
+ }
+
+ /* Take any necessary post-attaching actions for this platform. */
+ target_post_attach (PIDGET (inferior_ptid));
+
+ post_create_inferior (¤t_target, from_tty);
+
+ /* Install inferior's terminal modes. */
+ target_terminal_inferior ();
+
+ normal_stop ();
+ async_enable_stdin ();
+ if (deprecated_attach_hook)
+ deprecated_attach_hook ();
+}
+
/*
* TODO:
* Should save/restore the tty state since it might be that the
@@ -1906,6 +1963,24 @@ attach_command (char *args, int from_tty
*/
clear_solib ();
+ if (args)
+ {
+ int async_exec = strip_bg_char (&args);
+
+ /* If we get a request for running in the bg but the target
+ doesn't support it, error out. */
+ if (async_exec && !target_can_async_p ())
+ error (_("Asynchronous execution not supported on this target."));
+
+ /* If we don't get a request of running in the bg, then we need
+ to simulate synchronous (fg) execution. */
+ if (!async_exec && target_can_async_p ())
+ {
+ /* Simulate synchronous execution */
+ async_disable_stdin ();
+ }
+ }
+
target_attach (args, from_tty);
/* Set up the "saved terminal modes" of the inferior
@@ -1917,17 +1992,39 @@ attach_command (char *args, int from_tty
init_wait_for_inferior ();
clear_proceed_status ();
- /* No traps are generated when attaching to inferior under Mach 3
- or GNU hurd. */
+ if (target_can_async_p () && !sync_execution)
+ proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0);
+ else
+ {
+ /* No traps are generated when attaching to inferior under Mach 3
+ or GNU hurd. */
#ifndef ATTACH_NO_WAIT
- /* Careful here. See comments in inferior.h. Basically some OSes
- don't ignore SIGSTOPs on continue requests anymore. We need a
- way for handle_inferior_event to reset the stop_signal variable
- after an attach, and this is what STOP_QUIETLY_NO_SIGSTOP is for. */
- stop_soon = STOP_QUIETLY_NO_SIGSTOP;
- wait_for_inferior (0);
- stop_soon = NO_STOP_QUIETLY;
+ /* Careful here. See comments in inferior.h. Basically some OSes
+ don't ignore SIGSTOPs on continue requests anymore. We need a
+ way for handle_inferior_event to reset the stop_signal variable
+ after an attach, and this is what STOP_QUIETLY_NO_SIGSTOP is for. */
+ stop_soon = STOP_QUIETLY_NO_SIGSTOP;
+
+ if (target_can_async_p ())
+ {
+ struct continuation_arg *arg1, *arg2, *arg3;
+
+ arg1 =
+ (struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
+ arg2 =
+ (struct continuation_arg *) xmalloc (sizeof (struct continuation_arg));
+ arg1->next = arg2;
+ arg2->next = NULL;
+ arg1->data.pointer = args;
+ arg2->data.integer = from_tty;
+ add_continuation (attach_command_async_continuation, arg1);
+ return;
+ }
+
+ wait_for_inferior (0);
+ stop_soon = NO_STOP_QUIETLY;
#endif
+ }
/*
* If no exec file is yet known, try to determine it from the
@@ -1969,7 +2066,12 @@ attach_command (char *args, int from_tty
/* Install inferior's terminal modes. */
target_terminal_inferior ();
- normal_stop ();
+ if (target_can_async_p ())
+ /* We got here in !sync_execution mode, so there's no stop
+ reason. */
+ ;
+ else
+ normal_stop ();
if (deprecated_attach_hook)
deprecated_attach_hook ();
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: attach& support, and attach "async + sync_execution" support. 2008-03-14 8:05 attach& support, and attach "async + sync_execution" support Pedro Alves @ 2008-03-14 19:18 ` Daniel Jacobowitz 2008-03-15 16:22 ` Vladimir Prus 2008-03-17 15:48 ` Pedro Alves 0 siblings, 2 replies; 6+ messages in thread From: Daniel Jacobowitz @ 2008-03-14 19:18 UTC (permalink / raw) To: Pedro Alves; +Cc: gdb-patches On Fri, Mar 14, 2008 at 08:05:39AM +0000, Pedro Alves wrote: > 2008-03-14 Pedro Alves <pedro@codesourcery.com> > > * infcmd.c (attach_command_async_continuation): New. > (attach_command): Support background async execution, and async > execution in synchronous mode. Could you do some refactoring on this, please? It duplicates code from attach_command. When I fixed up step last year I moved the common code into its own function. Makes it much easier to see the differences between async and sync operation. And for instance it lets me see that you're calling deprecated_attach_hook twice in async mode :-) -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: attach& support, and attach "async + sync_execution" support. 2008-03-14 19:18 ` Daniel Jacobowitz @ 2008-03-15 16:22 ` Vladimir Prus 2008-03-17 15:48 ` Pedro Alves 1 sibling, 0 replies; 6+ messages in thread From: Vladimir Prus @ 2008-03-15 16:22 UTC (permalink / raw) To: gdb-patches Daniel Jacobowitz wrote: > On Fri, Mar 14, 2008 at 08:05:39AM +0000, Pedro Alves wrote: >> 2008-03-14 Pedro Alves <pedro@codesourcery.com> >> >> * infcmd.c (attach_command_async_continuation): New. >> (attach_command): Support background async execution, and async >> execution in synchronous mode. > > Could you do some refactoring on this, please? It duplicates code > from attach_command. Right. > When I fixed up step last year I moved the > common code into its own function. Makes it much easier to see > the differences between async and sync operation. And for instance > it lets me see that you're calling deprecated_attach_hook twice > in async mode :-) In fact, it's quite possible to always install continuation, and then immediately run it in a sync mode. I have a patch doing the same for finish; guess I better post it now ;-) - Volodya ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: attach& support, and attach "async + sync_execution" support. 2008-03-14 19:18 ` Daniel Jacobowitz 2008-03-15 16:22 ` Vladimir Prus @ 2008-03-17 15:48 ` Pedro Alves 2008-03-17 16:18 ` Daniel Jacobowitz 1 sibling, 1 reply; 6+ messages in thread From: Pedro Alves @ 2008-03-17 15:48 UTC (permalink / raw) To: gdb-patches [-- Attachment #1: Type: text/plain, Size: 1306 bytes --] A Friday 14 March 2008 19:18:21, Daniel Jacobowitz wrote: > Could you do some refactoring on this, please? It duplicates code > from attach_command. When I fixed up step last year I moved the > common code into its own function. Makes it much easier to see > the differences between async and sync operation. And for instance > it lets me see that you're calling deprecated_attach_hook twice > in async mode :-) I don't think I was :-) There were three different exit points. sync, async/sync_execution, and true async. I've reverted the bits that immediatelly proceed after attaching, and defered it to the continuation (for the attach& support). I'll look into short-circuiting that again when non-stop is in. The attach& mode is still supported, but we wait for everything to be stopped and stable before deciding to proceed or normal_stop. This is look alright? Tested on x86_64-unknown-linux-gnu with the linux async support (new patch follows) enabled and disabled. -- Pedro Alves (P.S. Am I the only one that thinks that continuation arguments suck? IMHO, we should move the continuation_arg data union into the continuation proper, and force people to use structs for the compound args. Oh, and who is responsible for freeing the continuation args? Nobody seems to be doing that.) [-- Attachment #2: attach_async_support.diff --] [-- Type: text/x-diff, Size: 5942 bytes --] 2008-03-14 Pedro Alves <pedro@codesourcery.com> * infcmd.c (attach_command_post_wait, attach_command_continuation): New. (attach_command): Support background async execution, and async execution in synchronous mode. --- gdb/infcmd.c | 152 ++++++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 110 insertions(+), 42 deletions(-) Index: src/gdb/infcmd.c =================================================================== --- src.orig/gdb/infcmd.c 2008-03-17 14:55:00.000000000 +0000 +++ src/gdb/infcmd.c 2008-03-17 15:13:04.000000000 +0000 @@ -1875,11 +1875,83 @@ vector_info (char *args, int from_tty) This stops it cold in its tracks and allows us to start debugging it. and wait for the trace-trap that results from attaching. */ +static void +attach_command_post_wait (char *args, int from_tty, int async_exec) +{ + char *exec_file; + char *full_exec_path = NULL; + + stop_soon = NO_STOP_QUIETLY; + + /* If no exec file is yet known, try to determine it from the + process itself. */ + exec_file = (char *) get_exec_file (0); + if (!exec_file) + { + exec_file = target_pid_to_exec_file (PIDGET (inferior_ptid)); + if (exec_file) + { + /* It's possible we don't have a full path, but rather just a + filename. Some targets, such as HP-UX, don't provide the + full path, sigh. + + Attempt to qualify the filename against the source path. + (If that fails, we'll just fall back on the original + filename. Not much more we can do...) + */ + if (!source_full_path_of (exec_file, &full_exec_path)) + full_exec_path = savestring (exec_file, strlen (exec_file)); + + exec_file_attach (full_exec_path, from_tty); + symbol_file_add_main (full_exec_path, from_tty); + } + } + else + { + reopen_exec_file (); + reread_symbols (); + } + + /* Take any necessary post-attaching actions for this platform. */ + target_post_attach (PIDGET (inferior_ptid)); + + post_create_inferior (¤t_target, from_tty); + + /* Install inferior's terminal modes. */ + target_terminal_inferior (); + + if (async_exec) + proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0); + else + { + if (target_can_async_p ()) + async_enable_stdin (); + normal_stop (); + if (deprecated_attach_hook) + deprecated_attach_hook (); + } +} + +static void +attach_command_continuation (struct continuation_arg * arg) +{ + char *args; + int from_tty; + int async_exec; + + args = (char *) arg->data.pointer; + from_tty = arg->next->data.integer; + async_exec = arg->next->next->data.integer; + + attach_command_post_wait (args, from_tty, async_exec); +} + void attach_command (char *args, int from_tty) { char *exec_file; char *full_exec_path = NULL; + int async_exec = 0; dont_repeat (); /* Not for the faint of heart */ @@ -1913,6 +1985,24 @@ attach_command (char *args, int from_tty */ clear_solib (); + if (args) + { + async_exec = strip_bg_char (&args); + + /* If we get a request for running in the bg but the target + doesn't support it, error out. */ + if (async_exec && !target_can_async_p ()) + error (_("Asynchronous execution not supported on this target.")); + + /* If we don't get a request of running in the bg, then we need + to simulate synchronous (fg) execution. */ + if (!async_exec && target_can_async_p ()) + { + /* Simulate synchronous execution */ + async_disable_stdin (); + } + } + target_attach (args, from_tty); /* Set up the "saved terminal modes" of the inferior @@ -1932,54 +2022,32 @@ attach_command (char *args, int from_tty way for handle_inferior_event to reset the stop_signal variable after an attach, and this is what STOP_QUIETLY_NO_SIGSTOP is for. */ stop_soon = STOP_QUIETLY_NO_SIGSTOP; - wait_for_inferior (0); - stop_soon = NO_STOP_QUIETLY; -#endif - /* - * If no exec file is yet known, try to determine it from the - * process itself. - */ - exec_file = (char *) get_exec_file (0); - if (!exec_file) + if (target_can_async_p ()) { - exec_file = target_pid_to_exec_file (PIDGET (inferior_ptid)); - if (exec_file) - { - /* It's possible we don't have a full path, but rather just a - filename. Some targets, such as HP-UX, don't provide the - full path, sigh. - - Attempt to qualify the filename against the source path. - (If that fails, we'll just fall back on the original - filename. Not much more we can do...) - */ - if (!source_full_path_of (exec_file, &full_exec_path)) - full_exec_path = savestring (exec_file, strlen (exec_file)); + /* sync_execution mode. Wait for stop. */ + struct continuation_arg *arg1, *arg2, *arg3; - exec_file_attach (full_exec_path, from_tty); - symbol_file_add_main (full_exec_path, from_tty); - } + arg1 = + (struct continuation_arg *) xmalloc (sizeof (struct continuation_arg)); + arg2 = + (struct continuation_arg *) xmalloc (sizeof (struct continuation_arg)); + arg3 = + (struct continuation_arg *) xmalloc (sizeof (struct continuation_arg)); + arg1->next = arg2; + arg2->next = arg3; + arg3->next = NULL; + arg1->data.pointer = args; + arg2->data.integer = from_tty; + arg3->data.integer = async_exec; + add_continuation (attach_command_continuation, arg1); + return; } - else - { - reopen_exec_file (); - reread_symbols (); - } - - /* Take any necessary post-attaching actions for this platform. - */ - target_post_attach (PIDGET (inferior_ptid)); - - post_create_inferior (¤t_target, from_tty); - /* Install inferior's terminal modes. */ - target_terminal_inferior (); - - normal_stop (); + wait_for_inferior (0); +#endif - if (deprecated_attach_hook) - deprecated_attach_hook (); + attach_command_post_wait (args, from_tty, async_exec); } /* ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: attach& support, and attach "async + sync_execution" support. 2008-03-17 15:48 ` Pedro Alves @ 2008-03-17 16:18 ` Daniel Jacobowitz 2008-03-17 17:35 ` Pedro Alves 0 siblings, 1 reply; 6+ messages in thread From: Daniel Jacobowitz @ 2008-03-17 16:18 UTC (permalink / raw) To: Pedro Alves; +Cc: gdb-patches On Mon, Mar 17, 2008 at 03:48:09PM +0000, Pedro Alves wrote: > A Friday 14 March 2008 19:18:21, Daniel Jacobowitz wrote: > > Could you do some refactoring on this, please? It duplicates code > > from attach_command. When I fixed up step last year I moved the > > common code into its own function. Makes it much easier to see > > the differences between async and sync operation. And for instance > > it lets me see that you're calling deprecated_attach_hook twice > > in async mode :-) > > I don't think I was :-) There were three different exit points. > sync, async/sync_execution, and true async. Yep, you're correct. OK, it lets me confuse myself. > (P.S. Am I the only one that thinks that continuation > arguments suck? IMHO, we should move the continuation_arg data > union into the continuation proper, and force people to use > structs for the compound args. Oh, and who is responsible for > freeing the continuation args? Nobody seems to be doing that.) Yes, this is a mess. Maybe we should go back to just passing a void *... > + if (args) > + { > + async_exec = strip_bg_char (&args); > + > + /* If we get a request for running in the bg but the target > + doesn't support it, error out. */ > + if (async_exec && !target_can_async_p ()) > + error (_("Asynchronous execution not supported on this target.")); > + > + /* If we don't get a request of running in the bg, then we need > + to simulate synchronous (fg) execution. */ > + if (!async_exec && target_can_async_p ()) > + { > + /* Simulate synchronous execution */ > + async_disable_stdin (); > + } > + } This logic will work, since args should never be NULL anyway, but the call to async_disable_stdin is not dependent on args I think? Otherwise OK. -- Daniel Jacobowitz CodeSourcery ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: attach& support, and attach "async + sync_execution" support. 2008-03-17 16:18 ` Daniel Jacobowitz @ 2008-03-17 17:35 ` Pedro Alves 0 siblings, 0 replies; 6+ messages in thread From: Pedro Alves @ 2008-03-17 17:35 UTC (permalink / raw) To: gdb-patches [-- Attachment #1: Type: text/plain, Size: 1066 bytes --] A Monday 17 March 2008 16:17:58, Daniel Jacobowitz wrote: > On Mon, Mar 17, 2008 at 03:48:09PM +0000, Pedro Alves wrote: > > + if (args) > > + { > > + async_exec = strip_bg_char (&args); > > + > > + /* If we get a request for running in the bg but the target > > + doesn't support it, error out. */ > > + if (async_exec && !target_can_async_p ()) > > + error (_("Asynchronous execution not supported on this target.")); > > + > > + /* If we don't get a request of running in the bg, then we need > > + to simulate synchronous (fg) execution. */ > > + if (!async_exec && target_can_async_p ()) > > + { > > + /* Simulate synchronous execution */ > > + async_disable_stdin (); > > + } > > + } > > This logic will work, since args should never be NULL anyway, but the > call to async_disable_stdin is not dependent on args I think? > You're right, it's not. Although this would only break if a target has some sort of default pid to attach to. > Otherwise OK. Thanks! This is what I checked in. -- Pedro Alves [-- Attachment #2: attach_async_support.diff --] [-- Type: text/x-diff, Size: 6276 bytes --] Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.9231 diff -u -p -r1.9231 ChangeLog --- ChangeLog 17 Mar 2008 15:05:42 -0000 1.9231 +++ ChangeLog 17 Mar 2008 17:29:52 -0000 @@ -1,3 +1,10 @@ +2008-03-17 Pedro Alves <pedro@codesourcery.com> + + * infcmd.c (attach_command_post_wait) + (attach_command_continuation): New. + (attach_command): Support background async execution, and async + execution in synchronous mode. + 2008-03-17 Daniel Jacobowitz <dan@codesourcery.com> * stack.c (print_stack_frame, print_frame): Use RETURN_MASK_ERROR. Index: infcmd.c =================================================================== RCS file: /cvs/src/src/gdb/infcmd.c,v retrieving revision 1.173 diff -u -p -r1.173 infcmd.c --- infcmd.c 14 Mar 2008 23:24:53 -0000 1.173 +++ infcmd.c 17 Mar 2008 17:29:53 -0000 @@ -1875,11 +1875,83 @@ vector_info (char *args, int from_tty) This stops it cold in its tracks and allows us to start debugging it. and wait for the trace-trap that results from attaching. */ +static void +attach_command_post_wait (char *args, int from_tty, int async_exec) +{ + char *exec_file; + char *full_exec_path = NULL; + + stop_soon = NO_STOP_QUIETLY; + + /* If no exec file is yet known, try to determine it from the + process itself. */ + exec_file = (char *) get_exec_file (0); + if (!exec_file) + { + exec_file = target_pid_to_exec_file (PIDGET (inferior_ptid)); + if (exec_file) + { + /* It's possible we don't have a full path, but rather just a + filename. Some targets, such as HP-UX, don't provide the + full path, sigh. + + Attempt to qualify the filename against the source path. + (If that fails, we'll just fall back on the original + filename. Not much more we can do...) + */ + if (!source_full_path_of (exec_file, &full_exec_path)) + full_exec_path = savestring (exec_file, strlen (exec_file)); + + exec_file_attach (full_exec_path, from_tty); + symbol_file_add_main (full_exec_path, from_tty); + } + } + else + { + reopen_exec_file (); + reread_symbols (); + } + + /* Take any necessary post-attaching actions for this platform. */ + target_post_attach (PIDGET (inferior_ptid)); + + post_create_inferior (¤t_target, from_tty); + + /* Install inferior's terminal modes. */ + target_terminal_inferior (); + + if (async_exec) + proceed ((CORE_ADDR) -1, TARGET_SIGNAL_0, 0); + else + { + if (target_can_async_p ()) + async_enable_stdin (); + normal_stop (); + if (deprecated_attach_hook) + deprecated_attach_hook (); + } +} + +static void +attach_command_continuation (struct continuation_arg *arg) +{ + char *args; + int from_tty; + int async_exec; + + args = (char *) arg->data.pointer; + from_tty = arg->next->data.integer; + async_exec = arg->next->next->data.integer; + + attach_command_post_wait (args, from_tty, async_exec); +} + void attach_command (char *args, int from_tty) { char *exec_file; char *full_exec_path = NULL; + int async_exec = 0; dont_repeat (); /* Not for the faint of heart */ @@ -1913,6 +1985,24 @@ attach_command (char *args, int from_tty */ clear_solib (); + if (args) + { + async_exec = strip_bg_char (&args); + + /* If we get a request for running in the bg but the target + doesn't support it, error out. */ + if (async_exec && !target_can_async_p ()) + error (_("Asynchronous execution not supported on this target.")); + } + + /* If we don't get a request of running in the bg, then we need + to simulate synchronous (fg) execution. */ + if (!async_exec && target_can_async_p ()) + { + /* Simulate synchronous execution */ + async_disable_stdin (); + } + target_attach (args, from_tty); /* Set up the "saved terminal modes" of the inferior @@ -1932,54 +2022,32 @@ attach_command (char *args, int from_tty way for handle_inferior_event to reset the stop_signal variable after an attach, and this is what STOP_QUIETLY_NO_SIGSTOP is for. */ stop_soon = STOP_QUIETLY_NO_SIGSTOP; - wait_for_inferior (0); - stop_soon = NO_STOP_QUIETLY; -#endif - /* - * If no exec file is yet known, try to determine it from the - * process itself. - */ - exec_file = (char *) get_exec_file (0); - if (!exec_file) + if (target_can_async_p ()) { - exec_file = target_pid_to_exec_file (PIDGET (inferior_ptid)); - if (exec_file) - { - /* It's possible we don't have a full path, but rather just a - filename. Some targets, such as HP-UX, don't provide the - full path, sigh. + /* sync_execution mode. Wait for stop. */ + struct continuation_arg *arg1, *arg2, *arg3; - Attempt to qualify the filename against the source path. - (If that fails, we'll just fall back on the original - filename. Not much more we can do...) - */ - if (!source_full_path_of (exec_file, &full_exec_path)) - full_exec_path = savestring (exec_file, strlen (exec_file)); - - exec_file_attach (full_exec_path, from_tty); - symbol_file_add_main (full_exec_path, from_tty); - } + arg1 = + (struct continuation_arg *) xmalloc (sizeof (struct continuation_arg)); + arg2 = + (struct continuation_arg *) xmalloc (sizeof (struct continuation_arg)); + arg3 = + (struct continuation_arg *) xmalloc (sizeof (struct continuation_arg)); + arg1->next = arg2; + arg2->next = arg3; + arg3->next = NULL; + arg1->data.pointer = args; + arg2->data.integer = from_tty; + arg3->data.integer = async_exec; + add_continuation (attach_command_continuation, arg1); + return; } - else - { - reopen_exec_file (); - reread_symbols (); - } - - /* Take any necessary post-attaching actions for this platform. - */ - target_post_attach (PIDGET (inferior_ptid)); - - post_create_inferior (¤t_target, from_tty); - /* Install inferior's terminal modes. */ - target_terminal_inferior (); - - normal_stop (); + wait_for_inferior (0); +#endif - if (deprecated_attach_hook) - deprecated_attach_hook (); + attach_command_post_wait (args, from_tty, async_exec); } /* ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-03-17 17:35 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-03-14 8:05 attach& support, and attach "async + sync_execution" support Pedro Alves 2008-03-14 19:18 ` Daniel Jacobowitz 2008-03-15 16:22 ` Vladimir Prus 2008-03-17 15:48 ` Pedro Alves 2008-03-17 16:18 ` Daniel Jacobowitz 2008-03-17 17:35 ` Pedro Alves
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox