From: palves Date: Tue, 9 Sep 2008 12:08:11 +0000 (+0000) Subject: * gnu-nat.c (gnu_attach): Push target before fetching the list of X-Git-Tag: cgen-snapshot-20091101~5464 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d89d312aec0822e076ec91131bd89afe5c7ed532;p=pf3gnuchains%2Fpf3gnuchains4x.git * gnu-nat.c (gnu_attach): Push target before fetching the list of threads. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8edf7dd0ab..0ad28018da 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-09-09 Pedro Alves + + * gnu-nat.c (gnu_attach): Push target before fetching the list of + threads. + 2008-09-08 Daniel Jacobowitz * valops.c (value_cast_structs): Return NULL for failure. diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c index 3c99eb502d..9c99580246 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. */