From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31905 invoked by alias); 5 Mar 2004 16:36:20 -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 31884 invoked from network); 5 Mar 2004 16:36:14 -0000 Received: from unknown (HELO smtp.mba.ocn.ne.jp) (210.190.142.172) by sources.redhat.com with SMTP; 5 Mar 2004 16:36:14 -0000 Received: from localhost (p6065-ipad32funabasi.chiba.ocn.ne.jp [221.189.138.65]) by smtp.mba.ocn.ne.jp (Postfix) with ESMTP id 691484DAE; Sat, 6 Mar 2004 01:36:11 +0900 (JST) Date: Fri, 19 Mar 2004 00:09:00 -0000 Message-Id: <20040306.014343.74756819.anemo@mba.ocn.ne.jp> To: drow@false.org Cc: gdb-patches@sources.redhat.com Subject: Re: remote debugging a multi-threaded program with signal From: Atsushi Nemoto In-Reply-To: <20040305.112722.74754522.nemoto@toshiba-tops.co.jp> References: <20040305.000540.59461353.anemo@mba.ocn.ne.jp> <20040304222800.GA29911@nevyn.them.org> <20040305.112722.74754522.nemoto@toshiba-tops.co.jp> X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A B746 CA77 FE94 2874 D52F X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03/txt/msg00105.txt.bz2 >>>>> On Fri, 05 Mar 2004 11:27:22 +0900 (JST), Atsushi Nemoto said: anemo> How about when verbose-resume was disabled or unavailable? If anemo> verbose-resume is necessary to continue with signal, gdb can anemo> warn it for users? Or gdbserver can resume all threads on this anemo> case? For gdb without verbose-resume, how about this patch? With this patch, gdbserver uses general_thread instead of all_threads.head if 'CNN' packet was sent without preceding 'HcNN'. --- gdb-6.0.90.org/gdb/gdbserver/target.c Wed Jun 12 02:32:40 2002 +++ gdb-6.0.90/gdb/gdbserver/target.c Sat Mar 6 01:29:44 2004 @@ -49,6 +49,10 @@ set_desired_inferior (int use_general) if (found == NULL) found = (struct thread_info *) find_inferior_id (&all_threads, cont_thread); + /* failsafe: use thread in last resume_reply */ + if (found == NULL) + found = (struct thread_info *) find_inferior_id (&all_threads, + general_thread); } if (found == NULL) --- Atsushi Nemoto From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31905 invoked by alias); 5 Mar 2004 16:36:20 -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 31884 invoked from network); 5 Mar 2004 16:36:14 -0000 Received: from unknown (HELO smtp.mba.ocn.ne.jp) (210.190.142.172) by sources.redhat.com with SMTP; 5 Mar 2004 16:36:14 -0000 Received: from localhost (p6065-ipad32funabasi.chiba.ocn.ne.jp [221.189.138.65]) by smtp.mba.ocn.ne.jp (Postfix) with ESMTP id 691484DAE; Sat, 6 Mar 2004 01:36:11 +0900 (JST) Date: Fri, 05 Mar 2004 16:36:00 -0000 Message-ID: <20040306.014343.74756819.anemo@mba.ocn.ne.jp> To: drow@false.org Cc: gdb-patches@sources.redhat.com Subject: Re: remote debugging a multi-threaded program with signal From: Atsushi Nemoto In-Reply-To: <20040305.112722.74754522.nemoto@toshiba-tops.co.jp> References: <20040305.000540.59461353.anemo@mba.ocn.ne.jp> <20040304222800.GA29911@nevyn.them.org> <20040305.112722.74754522.nemoto@toshiba-tops.co.jp> X-Fingerprint: 6ACA 1623 39BD 9A94 9B1A B746 CA77 FE94 2874 D52F X-Pgp-Public-Key: http://wwwkeys.pgp.net/pks/lookup?op=get&search=0x2874D52F Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2004-03.o/txt/msg00105.txt Message-ID: <20040305163600.fxQ_UMxGt0VoI3kQnQASs3ndWAswKNeTRFOxLxIjX48@z> >>>>> On Fri, 05 Mar 2004 11:27:22 +0900 (JST), Atsushi Nemoto said: anemo> How about when verbose-resume was disabled or unavailable? If anemo> verbose-resume is necessary to continue with signal, gdb can anemo> warn it for users? Or gdbserver can resume all threads on this anemo> case? For gdb without verbose-resume, how about this patch? With this patch, gdbserver uses general_thread instead of all_threads.head if 'CNN' packet was sent without preceding 'HcNN'. --- gdb-6.0.90.org/gdb/gdbserver/target.c Wed Jun 12 02:32:40 2002 +++ gdb-6.0.90/gdb/gdbserver/target.c Sat Mar 6 01:29:44 2004 @@ -49,6 +49,10 @@ set_desired_inferior (int use_general) if (found == NULL) found = (struct thread_info *) find_inferior_id (&all_threads, cont_thread); + /* failsafe: use thread in last resume_reply */ + if (found == NULL) + found = (struct thread_info *) find_inferior_id (&all_threads, + general_thread); } if (found == NULL) --- Atsushi Nemoto