From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8673 invoked by alias); 28 Apr 2012 23:59:37 -0000 Received: (qmail 8665 invoked by uid 22791); 28 Apr 2012 23:59:36 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,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; Sat, 28 Apr 2012 23:59:22 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3SNxM6b017827 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 28 Apr 2012 19:59:22 -0400 Received: from psique (ovpn-112-35.phx2.redhat.com [10.3.112.35]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3SNxImw020834; Sat, 28 Apr 2012 19:59:20 -0400 From: Sergio Durigan Junior To: Jan Kratochvil Cc: gdb-patches@sourceware.org Subject: Re: Regression for gdb.trace/backtrace.exp [Re: [PATCH 0/4 v3] Add support for static and SystemTap probes] References: <20120428203733.GA4485@host2.jankratochvil.net> X-URL: http://www.redhat.com Date: Sun, 29 Apr 2012 06:29:00 -0000 In-Reply-To: <20120428203733.GA4485@host2.jankratochvil.net> (Jan Kratochvil's message of "Sat, 28 Apr 2012 22:37:33 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-04/txt/msg01057.txt.bz2 On Saturday, April 28 2012, Jan Kratochvil wrote: > On Mon, 23 Apr 2012 06:53:11 +0200, Sergio Durigan Junior wrote: >> Regtested on Fedora x86_64, no regressions. Comments are welcome. > > -PASS: gdb.trace/backtrace.exp: run trace experiment > +ERROR: Process no longer exists > 1786 loc->probe->pops->set_semaphore (loc->probe, loc->gdbarch); > (gdb) p loc->probe > $1 = (struct probe *) 0x0 > > It happens only with gdbserver. Thanks for catching this. I forgot to check if there is a probe before setting/clearing the semaphore. This code fixes the problem. I am committing it under the obvious rule. Again, thanks for catching. -- Sergio Index: gdb/ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.14185 diff -u -p -r1.14185 ChangeLog --- gdb/ChangeLog 28 Apr 2012 23:22:11 -0000 1.14185 +++ gdb/ChangeLog 28 Apr 2012 23:58:31 -0000 @@ -1,3 +1,8 @@ +2012-04-28 Sergio Durigan Junior + + * tracepoint.c (start_tracing, stop_tracing): Checking for NULL + probes, fixing a regression inserted by my previous patchset. + 2012-04-28 Doug Evans Initial support for Fission. http://gcc.gnu.org/wiki/DebugFission Index: gdb/tracepoint.c =================================================================== RCS file: /cvs/src/src/gdb/tracepoint.c,v retrieving revision 1.253 diff -u -p -r1.253 tracepoint.c --- gdb/tracepoint.c 27 Apr 2012 20:47:56 -0000 1.253 +++ gdb/tracepoint.c 28 Apr 2012 23:58:31 -0000 @@ -1783,7 +1783,8 @@ start_tracing (char *notes) t->number_on_target = b->number; for (loc = b->loc; loc; loc = loc->next) - loc->probe->pops->set_semaphore (loc->probe, loc->gdbarch); + if (loc->probe != NULL) + loc->probe->pops->set_semaphore (loc->probe, loc->gdbarch); } VEC_free (breakpoint_p, tp_vec); @@ -1878,7 +1879,8 @@ stop_tracing (char *note) but we don't really care if this semaphore goes out of sync. That's why we are decrementing it here, but not taking care in other places. */ - loc->probe->pops->clear_semaphore (loc->probe, loc->gdbarch); + if (loc->probe != NULL) + loc->probe->pops->clear_semaphore (loc->probe, loc->gdbarch); } }