From: Pedro Alves Date: Fri, 13 Jan 2012 20:06:40 +0000 (+0000) Subject: 2012-01-13 Pedro Alves X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d5d4e982dcfc68a869ab0f63146751f6ba27c58;p=binutils-gdb.git 2012-01-13 Pedro Alves * server.c (attach_inferior): Clear `cont_thread'. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 89a4cdde127..14950fbadbe 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2012-01-13 Pedro Alves + + * server.c (attach_inferior): Clear `cont_thread'. + 2012-01-13 Pedro Alves * server.c (main): Avoid infinite loop while detaching/killing diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index f312a5c650a..bebccf5a6a0 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -338,6 +338,10 @@ attach_inferior (int pid) whichever we were told to attach to. */ signal_pid = pid; + /* Clear this so the backend doesn't get confused, thinking + CONT_THREAD died, and it needs to resume all threads. */ + cont_thread = null_ptid; + if (!non_stop) { last_ptid = mywait (pid_to_ptid (pid), &last_status, 0, 0);