From: Jim Ingham <jingham@apple.com>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Vladimir Prus <ghost@cs.msu.su>, gdb@sources.redhat.com
Subject: Re: 'continue' command problem
Date: Tue, 26 Jun 2007 18:16:00 -0000 [thread overview]
Message-ID: <81922B5F-74B3-4CCF-A690-FA58B50C94D6@apple.com> (raw)
In-Reply-To: <18048.39066.783422.293969@kahikatea.snap.net.nz>
Ah, sorry, I just called the field "commands". It's done in
breakpoint.c, in "print_it_typical" (in the Apple sources).
The way I implemented it, I added a *started message to tell the UI
that we had restarted because of a breakpoint command, as well as a
^continuing. I forget exactly why I chose to do it this way, it's
maybe a little overdetermined. (Note, we also added a -breakpoint-
commands" command to set the breakpoint commands...)
Anyway, this looks like:
gdbrulez:/tmp > gdb a.out
GNU gdb 6.3.50-20050815 (Apple version gdb-688) (Sat Jun 16 20:20:22
UTC 2007)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-apple-darwin"...Reading symbols for
shared libraries ... done
(gdb) list main
1 int
2 main ()
3 {
4 int foo = 0;
5
6 while (foo < 100)
7 {
8 foo++;
9 }
10
(gdb) break 8
Breakpoint 1 at 0x1fa1: file main.c, line 8.
(gdb) commands 1
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just "end".
>print foo
>continue
>end
(gdb) set interpreter mi1
-exec-run
~"[Switching to process 19582 local thread 0x1103]\n"
=shlibs-updated
^running
(gdb)
~"$1 = 0"
~"\n"
~"Continuing.\n"
^continuing
*started,reason="breakpoint-command"
*stopped
,time
=
{wallclock
=
"0.00153
",user
=
"0.00046
",system
=
"0.00098
",start
="1182881550.648028",end="1182881550.649559"},reason="breakpoint-
hit",commands="yes",times="2",bkptno="1",thread-id="1"
~"$2 = 1"
~"\n"
~"Continuing.\n"
^continuing
*started,reason="breakpoint-command"
*stopped
,time
=
{wallclock
=
"0.00101
",user
=
"0.00034
",system
=
"0.00071
",start
="1182881550.649577",end="1182881550.650586"},reason="breakpoint-
hit",commands="yes",times="3",bkptno="1",thread-id="1"
~"$3 = 2"
~"\n"
~"Continuing.\n"
^continuing
Jim
On Jun 25, 2007, at 9:39 PM, Nick Roberts wrote:
> Jim Ingham writes:
>> At Apple, we also added a "breakpoint-commands" output field to the
>> "*stopped - breakpoint-hit" message.
>
> I can see an MI command -break-commands but no output field,
> "breakpoint-commands". Which file is it in?
>
>
> --
> Nick http://www.inet.net.nz/~nickrob
next prev parent reply other threads:[~2007-06-26 18:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200706041421.21962.leonp@plris.com>
2007-06-25 7:02 ` Vladimir Prus
2007-06-25 7:51 ` Nick Roberts
2007-06-25 18:04 ` Jim Ingham
2007-06-26 4:40 ` Nick Roberts
2007-06-26 18:16 ` Jim Ingham [this message]
2007-06-27 0:12 ` Nick Roberts
2007-06-26 7:13 ` 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=81922B5F-74B3-4CCF-A690-FA58B50C94D6@apple.com \
--to=jingham@apple.com \
--cc=gdb@sources.redhat.com \
--cc=ghost@cs.msu.su \
--cc=nickrob@snap.net.nz \
/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