From 7d5d4e982dcfc68a869ab0f63146751f6ba27c58 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Fri, 13 Jan 2012 20:06:40 +0000 Subject: [PATCH] 2012-01-13 Pedro Alves * server.c (attach_inferior): Clear `cont_thread'. --- gdb/gdbserver/ChangeLog | 4 ++++ gdb/gdbserver/server.c | 4 ++++ 2 files changed, 8 insertions(+) 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); -- 2.30.2