From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5207 invoked by alias); 19 Apr 2012 00:22:49 -0000 Received: (qmail 5192 invoked by uid 22791); 19 Apr 2012 00:22:45 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 Apr 2012 00:22:19 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3J0M8eZ003406 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 18 Apr 2012 20:22:09 -0400 Received: from valrhona.uglyboxes.com (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3J0M5KJ012950 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Wed, 18 Apr 2012 20:22:08 -0400 Message-ID: <4F8F5AAD.9050207@redhat.com> Date: Thu, 19 Apr 2012 00:22:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 MIME-Version: 1.0 To: Patrick Monnerat CC: insight@sourceware.org Subject: Re: [PATCH] fix error sending signal to dead process References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact insight-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sourceware.org X-SW-Source: 2012-q2/txt/msg00019.txt.bz2 On 04/05/2012 05:45 AM, Patrick Monnerat wrote: > The attached patch fixes this problem. It simply do not pass signal to > tcl if the pid is null. A nit or two, comments below. > P.S.: the bug report system linked from your web site > (http://sources.redhat.com/cgi-bin/gnatsweb.pl?database=insight&user=gue > st&password=guest&cmd=login) is down (HTTP error 500). Gah! It looks like sourceware is now 100% bugzilla, but insight was never "converted" (aka I thought the "old" bug database was still around). I'll update the page to ask viewers to submit bugs here for the interim. Thank you for bringing this to my attention. > diff -Naur insight-7.4.50.orig/gdb/gdbtk/generic/gdbtk-hooks.c insight-7.4.50.new/gdb/gdbtk/generic/gdbtk-hooks.c > --- insight-7.4.50.orig/gdb/gdbtk/generic/gdbtk-hooks.c 2012-03-28 15:09:12.000000000 +0200 > +++ insight-7.4.50.new/gdb/gdbtk/generic/gdbtk-hooks.c 2012-04-05 12:44:20.284306992 +0200 > @@ -804,7 +804,7 @@ > gdbtk_annotate_signal (void) > { > char *buf; > - struct thread_info *tp = inferior_thread (); > + struct thread_info *tp; > > /* Inform gui that the target has stopped. This is > a necessary stop button evil. We don't want signal notification > @@ -812,6 +812,11 @@ > timeout. */ > Tcl_Eval (gdbtk_interp, "gdbtk_stop_idle_callback"); > > + if (ptid_equal(inferior_ptid, null_ptid)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There should be spaces between function names and opening parenthesis. [Yeah, it's rather lame, but it is GNU coding standard. Insight follows GDB's conventions.] ChangeLog entry? > + return; > + > + tp = inferior_thread (); > + > buf = xstrprintf ("gdbtk_signal %s {%s}", > target_signal_to_name (tp->suspend.stop_signal), > target_signal_to_string (tp->suspend.stop_signal)); [Aside: Eew. I can't believe Tcl_Eval is still being used!] Keith