Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Nick Roberts <nickrob@snap.net.nz>
To: Aleksandar Ristovski <aristovski@qnx.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] fix for PR2424
Date: Sat, 08 Mar 2008 11:31:00 -0000	[thread overview]
Message-ID: <18386.30968.205634.560266@kahikatea.snap.net.nz> (raw)
In-Reply-To: <47CED9FB.7090904@qnx.com>

 > 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  <aristovski@qnx.com>
 > 
 > 	* 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 <aristovski@qnx.com>
 > 
 > 	* 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


  reply	other threads:[~2008-03-08 11:31 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-05 17:36 Aleksandar Ristovski
2008-03-08 11:31 ` Nick Roberts [this message]
2008-03-08 18:36 ` Vladimir Prus
2008-03-09  0:12   ` Aleksandar Ristovski
2008-03-09  3:32     ` Nick Roberts
2008-03-09  4:55       ` Aleksandar Ristovski
2008-03-10  8:11     ` Vladimir Prus
2008-03-10 14:29       ` Aleksandar Ristovski
2008-03-10 14:45         ` Vladimir Prus
2008-03-10 17:18           ` Aleksandar Ristovski
2008-03-10 17:36             ` Vladimir Prus
2008-03-10 18:50               ` Aleksandar Ristovski
2008-04-01 19:41 Aleksandar Ristovski
2008-04-14 15:16 Aleksandar Ristovski
2008-04-14 18:06 ` Daniel Jacobowitz
2008-04-15 15:07 Aleksandar Ristovski
2008-04-15 15:25 ` Daniel Jacobowitz
2008-04-16 13:17 ` Vladimir Prus
2008-04-23 11:16 ` Vladimir Prus
2008-04-15 15:31 Aleksandar Ristovski
2008-04-16 18:28 Aleksandar Ristovski
2008-04-23 17:48 Aleksandar Ristovski
2008-04-23 17:49 ` Vladimir Prus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=18386.30968.205634.560266@kahikatea.snap.net.nz \
    --to=nickrob@snap.net.nz \
    --cc=aristovski@qnx.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox