From: Jason Molenda <jmolenda@apple.com>
To: Nick Roberts <nickrob@gnu.org>
Cc: Andrew Cagney <cagney@gnu.org>, Alain Magloire <alain@qnx.com>,
gdb@sources.redhat.com
Subject: Re: How does GDB/MI give the current frame
Date: Thu, 15 Jul 2004 20:19:00 -0000 [thread overview]
Message-ID: <28ADB7D6-D69A-11D8-BBF3-000A9569836A@apple.com> (raw)
In-Reply-To: <16630.57035.572672.532135@nick.uklinux.net>
On Jul 15, 2004, at 12:45 PM, Nick Roberts wrote:
>> That's almost the whole idea. The -interpreter-exec command provides
>> two mechanism to the GUI/client:
>>
>> - the ability to access GDB's `console' vis:
>> -> -interpreter cli "up"
>> <- ~"info on new frame..."
>> <- done
>>
>> - the ability to notify the GUI of console sideeffects vis:
>> <- *select-frame,<frame-info>...
>
> That sounds like a third interface. This is an elegant approach but
> assumes
> that someone will implement the notification for every CLI command
> that has
> side effects. This seems unlikely in the current circumstances
For what it's worth, at Apple we've done what Andrew is proposing. Our
method spits out a "MI_HOOK_RESULT" notification on the ^done result
whenever the console command entered by the user has changed the state
in an important way. e.g.
(gdb)
-interpreter-exec console-quoted up
~"#2 0x000321f4 in gdb_main (args=0xbffff620) at
../../gdb/src/gdb/main.c:851\n"
~"851\t catch_errors (captured_main, args, \"\", RETURN_MASK_ALL);\n"
^done,MI_HOOK_RESULT=[HOOK_TYPE="frame_changed",frame="2"],time=
{wallclock="0.00620",user="0.00323",system="0.00283",start="1089921236.3
59009",end="1089921236.365212"}
(gdb)
(Ignore the "console-quoted" -- we have a separate interpreter for
console output marshalled through the MI quoting rules)
(and ignore the time= thing at the end; that's a little internal debug
thing we use to track down performance problems more easily between gdb
an the UI. Our UI has a feature where it saves all MI text to a file
for debugging; it's *invaluable* for tracking down bugs and our UI
timestamps its own logging messages so we can tell whether the UI or
gdb is being slow when we get reports of slowness.)
FWIW, here's the list of notification hooks we currently generate:
breakpoint_create, breakpoint_modify, breakpoint_delete, stack_changed,
frame_changed, thread_changed.
J
next prev parent reply other threads:[~2004-07-15 20:04 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-24 22:54 Nick Roberts
2004-06-24 23:17 ` Daniel Jacobowitz
2004-06-26 9:10 ` Nick Roberts
2004-06-26 14:59 ` Daniel Jacobowitz
2004-06-27 2:12 ` Andrew Cagney
2004-06-30 20:47 ` Alain Magloire
[not found] ` <200406302047.QAA29956@smtp.ott.qnx.com>
2004-07-02 17:29 ` Nick Roberts
2004-07-08 22:15 ` Andrew Cagney
2004-07-08 23:07 ` Alain Magloire
2004-07-11 22:49 ` Nick Roberts
2004-07-12 14:24 ` Andrew Cagney
2004-07-12 20:09 ` Nick Roberts
2004-07-15 14:48 ` Andrew Cagney
2004-07-15 19:50 ` Nick Roberts
2004-07-15 20:19 ` Jason Molenda [this message]
2004-07-15 21:08 ` Jason Molenda
2004-07-16 14:12 ` Alain Magloire
2004-07-16 14:08 ` Alain Magloire
[not found] ` <200407161404.KAA02192@smtp.ott.qnx.com>
2004-07-18 21:07 ` Nick Roberts
2004-07-26 21:31 ` Andrew Cagney
[not found] ` <200407082307.TAA09285@smtp.ott.qnx.com>
2004-07-11 22:49 ` Nick Roberts
2004-07-12 18:30 ` Alain Magloire
[not found] ` <200407121751.NAA24942@smtp.ott.qnx.com>
2004-07-14 4:00 ` Nick Roberts
2004-06-25 15:12 ` Andrew Cagney
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=28ADB7D6-D69A-11D8-BBF3-000A9569836A@apple.com \
--to=jmolenda@apple.com \
--cc=alain@qnx.com \
--cc=cagney@gnu.org \
--cc=gdb@sources.redhat.com \
--cc=nickrob@gnu.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