From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23663 invoked by alias); 28 Feb 2004 18:24:40 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 23654 invoked from network); 28 Feb 2004 18:24:40 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 28 Feb 2004 18:24:40 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Ax98h-0004TI-Mp for ; Sat, 28 Feb 2004 13:24:39 -0500 Date: Sat, 28 Feb 2004 18:24:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: [patch/gdbserver] Update current inferior when using vCont Message-ID: <20040228182439.GA17159@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2004-02/txt/msg00849.txt.bz2 Extensive testing on a software-single-step target using vCont turned up a problem that testing on x86 didn't - not surprising, since gdbserver is stressed much harder in this case. By not calling set_desired_inferior after setting cont_thread, we could end up sending signals to the wrong thread on an interrupt from the client. Will commit in a bit. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2004-02-28 Daniel Jacobowitz * server.c (handle_v_cont): Call set_desired_inferior. Index: gdb/gdbserver/server.c =================================================================== RCS file: /big/fsf/rsync/src-cvs/src/gdb/gdbserver/server.c,v retrieving revision 1.16 diff -u -p -r1.16 server.c --- gdb/gdbserver/server.c 13 Oct 2003 16:17:21 -0000 1.16 +++ gdb/gdbserver/server.c 28 Feb 2004 03:06:13 -0000 @@ -213,6 +215,7 @@ handle_v_cont (char *own_buf, char *stat cont_thread = resume_info[0].thread; else cont_thread = -1; + set_desired_inferior (0); (*the_target->resume) (resume_info);