summaryrefslogtreecommitdiff
path: root/gdb/infcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/infcmd.c')
-rw-r--r--gdb/infcmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/infcmd.c b/gdb/infcmd.c
index 46d57bed66e..58875d3b229 100644
--- a/gdb/infcmd.c
+++ b/gdb/infcmd.c
@@ -1788,9 +1788,6 @@ attach_command (char *args, int from_tty)
based on what modes we are starting it with. */
target_terminal_init ();
- /* Install inferior's terminal modes. */
- target_terminal_inferior ();
-
/* Set up execution context to know that we should return from
wait_for_inferior as soon as the target reports a stop. */
init_wait_for_inferior ();
@@ -1849,6 +1846,9 @@ attach_command (char *args, int from_tty)
*/
target_post_attach (PIDGET (inferior_ptid));
+ /* Install inferior's terminal modes. */
+ target_terminal_inferior ();
+
normal_stop ();
if (deprecated_attach_hook)