aboutsummaryrefslogtreecommitdiff
path: root/gdb/gnu-nat.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2008-09-09 12:08:12 +0000
committerPedro Alves <palves@redhat.com>2008-09-09 12:08:12 +0000
commita9ab742235f3a8b10f1402ada34fe2d1bed6aee9 (patch)
tree8ba08bb4164f5e6b989c0088d4e4b4c78cb501d2 /gdb/gnu-nat.c
parent44e36d8a7bda0394ebfe93378868c79b63c24aa3 (diff)
downloadgdb-a9ab742235f3a8b10f1402ada34fe2d1bed6aee9.zip
gdb-a9ab742235f3a8b10f1402ada34fe2d1bed6aee9.tar.gz
gdb-a9ab742235f3a8b10f1402ada34fe2d1bed6aee9.tar.bz2
* gnu-nat.c (gnu_attach): Push target before fetching the list of
threads.
Diffstat (limited to 'gdb/gnu-nat.c')
-rw-r--r--gdb/gnu-nat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index 3c99eb5..9c99580 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -2170,12 +2170,14 @@ gnu_attach (char *args, int from_tty)
inf_debug (inf, "attaching to pid: %d", pid);
inf_attach (inf, pid);
+
+ push_target (&gnu_ops);
+
inf_update_procs (inf);
inferior_ptid = ptid_build (pid, 0, inf_pick_first_thread ());
attach_flag = 1;
- push_target (&gnu_ops);
/* We have to initialize the terminal settings now, since the code
below might try to restore them. */