From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28097 invoked by alias); 8 Mar 2008 11:31:44 -0000 Received: (qmail 28088 invoked by uid 22791); 8 Mar 2008 11:31:42 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 08 Mar 2008 11:31:15 +0000 Received: from kahikatea.snap.net.nz (134.30.255.123.static.snap.net.nz [123.255.30.134]) by viper.snap.net.nz (Postfix) with ESMTP id D7D3B3DA60E; Sun, 9 Mar 2008 00:31:11 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 1000) id 9820B8FC6D; Sun, 9 Mar 2008 00:31:05 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18386.30968.205634.560266@kahikatea.snap.net.nz> Date: Sat, 08 Mar 2008 11:31:00 -0000 To: Aleksandar Ristovski Cc: gdb-patches@sourceware.org Subject: Re: [patch] fix for PR2424 In-Reply-To: <47CED9FB.7090904@qnx.com> References: <47CED9FB.7090904@qnx.com> X-Mailer: VM 7.19 under Emacs 22.1.91.2 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: 2008-03/txt/msg00063.txt.bz2 > With the attached patch for testsuite and the patch itself, the PR should be > fixed. It's not the right fix, though, because from a console the temporary breakpoint now gets reported when execution stops. Currently: (gdb) tbreak main Breakpoint 1 at 0x8048687: file myprog.c, line 95. (gdb) run Starting program: /home/nickrob/myprog main (argc=1, argv=0xbfcacf74) at myprog.c:95 95 main (int argc, char **argv) { (gdb) After your change: (gdb) tbreak main Breakpoint 1 at 0x8048687: file myprog.c, line 95. (gdb) run Starting program: /home/nickrob/myprog Breakpoint 1, main (argc=1, argv=0xbf844314) at myprog.c:95 95 main (int argc, char **argv) { (gdb) > Thanks, > > Aleksandar Ristovski > QNX Software Systems > > > Testsuite: > 2008-03-05 Aleksandar Ristovski > > * gdb.mi/mi-support.exp: Add "reason" to the matching pattern. This > is to support fix for PR2424. > > infrun.c: > 2008-03-05 Aleksandar Ristovski > > * infrun.c (normal_stop) Move breakpoint_auto_delete further down > to allow printing to 'see' real reason of stop. This fixes PR 2424. > > > > Index: gdb/testsuite/lib/mi-support.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v > retrieving revision 1.51 > diff -r1.51 mi-support.exp > 893c893 > < -re ".*000\\*stopped,thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"$func\",args=\(\\\[.*\\\]\|\{.*\}\),file=\".*\",fullname=\"${fullname_syntax}.*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" { > --- > > -re ".*000\\*stopped,reason=.*thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"$func\",args=\(\\\[.*\\\]\|\{.*\}\),file=\".*\",fullname=\"${fullname_syntax}.*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" { > Index: gdb/infrun.c > =================================================================== > RCS file: /cvs/src/src/gdb/infrun.c,v > retrieving revision 1.266 > diff -u -p -r1.266 infrun.c > --- gdb/infrun.c 29 Jan 2008 22:47:19 -0000 1.266 > +++ gdb/infrun.c 5 Mar 2008 16:08:02 -0000 > @@ -3151,11 +3151,6 @@ Further execution is probably impossible > } > } > > - /* Delete the breakpoint we stopped at, if it wants to be deleted. > - Delete any breakpoint that is to be deleted at the next stop. */ > - > - breakpoint_auto_delete (stop_bpstat); > - > /* If an auto-display called a function and that got a signal, > delete that auto-display to avoid an infinite recursion. */ > > @@ -3292,6 +3287,9 @@ Further execution is probably impossible > } > > done: > + /* Delete the breakpoint we stopped at, if it wants to be deleted. > + Delete any breakpoint that is to be deleted at the next stop. */ > + breakpoint_auto_delete (stop_bpstat); > annotate_stopped (); > observer_notify_normal_stop (stop_bpstat); > } -- Nick http://www.inet.net.nz/~nickrob