From: Jim Ingham <jingham@apple.com>
To: Bob Rossi <bob@brasko.net>
Cc: gdb-patches@sources.redhat.com, Eli Zaretskii <eliz@gnu.org>
Subject: Re: RFC: MI output during program execution
Date: Sat, 13 Aug 2005 00:44:00 -0000 [thread overview]
Message-ID: <C1459687-8117-47C7-8236-19A8B36B301A@apple.com> (raw)
In-Reply-To: <20050813002230.GA11892@white>
Bob,
On Aug 12, 2005, at 5:22 PM, Bob Rossi wrote:
>>> Thanks for all the guidence so far. Even though you have not
>>> attempted
>>> the observer approach, how do you feel about it? Is this something
>>> that
>>> you think could be accomplished with the current FSF GDB? Nick,
>>> Daniel
>>> and Eli, do you like this approach? I'm sure I could find some
>>> time to
>>> get something going in this direction, with a little bit of thought.
>>>
>>
>> This should work fine. Actually, the "events" that Keith introduced
>> seems easier to do, since it looks like there's already an event call
>> wherever there is a "deprecated_*_hook" but I am not sure what the
>> difference between events & observers is supposed to be...
>>
>
> OK, unfortunatly, I'm still trying to catch up here. I think I
> understand the observer approach, however, what is the event approach?
> Is that different than the "hooks" you have?
I don't have a good answer here, there is some history that I don't
fully understand. There used to be _hook functions, that you put in
various interesting places in gdb, and called like:
if (create_breakpoint_hook)
create_breakpoint_hook (b);
So in the MI, when I am about to call into the cli interpreter, first
I put in place a bunch of hooks, and then they get called to tell me
if anything interesting happens.
In current TOT gdb, I see instead:
if (deprecated_create_breakpoint_hook)
deprecated_create_breakpoint_hook (b);
breakpoint_create_event (b->number);
where breakpoint_create_event does:
void
breakpoint_create_event (int b)
{
if (gdb_events_debug)
fprintf_unfiltered (gdb_stdlog, "breakpoint_create_event\n");
if (!current_event_hooks->breakpoint_create)
return;
current_event_hooks->breakpoint_create (b);
}
Okay...
So it LOOKS like the "events" are supposed to be the replacements for
the hooks...
But then there's the whole observer thing, which from what I read of
the gdb-patches traffic at the time was supposed to be a more general
solution for watching interesting events. But it doesn't seem to be
used all that much.
So I am not really sure what's supposed to be happening here.
Moving from hooks to events seems a trivial formal exercise. I don't
know if they will get deprecated soon or what, however...
>
>
>>> Anyone else willing to work towards this solution?
>>>
>>> I really like Daniel's idea of just alerting the user that
>>> something has
>>> changed, instead of actually giving the user the data. For
>>> instance he
>>> had,
>>>
>>> =breakpoint-changed,[bpnum="1",state="disabled"]
>>> =thread-changed,[thread="2"]
>>>
>>> I might even prefer,
>>> =breakpoint-changed,thread-changed
>>> which would then allow the FE to call -list-breakpoints or
>>> whatever if
>>> they are interested.
>>>
>>
>> Why? These sorts of events are never going to have that much data in
>> them. Why would you want to force another round trip just to avoid
>> packaging up some data that you already have on hand. That just
>> makes the UI's job more complicated. For instance, if a breakpoint
>> command set a breakpoint and started the target going again,
>> currently you are going to have to stop the target to get the
>> breakpoint list, which seems silly. And even if we made "-break-
>> info" a command that you can issue while the target is going, what if
>> it stopped again between you sending the break info and it getting
>> processed. You will get another async message before you get the
>> break info response...
>>
>> Of course the UI has got to be robust against this sort of thing, but
>> I see no reason to make the job arbitrarily complex.
>>
>> Again, what is your reason for wanting to do this?
>>
>
> Well, I just figured it would be easier to say, "This has changed",
> instead of giving the entire change. However, if I'm wrong here,
> that is
> fine. It's easy to change this kind of thing once the functionality is
> in place. As long as the approach is aggreed on, then I think we'll
> all
> be happy.
Cool...
Jim
next prev parent reply other threads:[~2005-08-13 0:33 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1123605445.30442.ezmlm@sources.redhat.com>
2005-08-09 17:24 ` Jim Ingham
2005-08-09 17:59 ` Bob Rossi
2005-08-09 18:09 ` Jim Ingham
2005-08-09 18:23 ` Bob Rossi
2005-08-09 18:40 ` Jim Ingham
2005-08-10 0:48 ` Daniel Jacobowitz
2005-08-10 0:48 ` Jim Ingham
2005-08-10 2:37 ` Daniel Jacobowitz
2005-08-09 18:13 ` Eli Zaretskii
2005-08-09 18:23 ` Bob Rossi
2005-08-09 19:39 ` Eli Zaretskii
2005-08-10 0:41 ` Bob Rossi
2005-08-10 0:42 ` Daniel Jacobowitz
2005-08-10 1:07 ` Bob Rossi
2005-08-10 2:37 ` Jim Ingham
2005-08-12 8:06 ` Bob Rossi
2005-08-12 10:36 ` Eli Zaretskii
2005-08-12 12:05 ` Bob Rossi
2005-08-12 17:25 ` Eli Zaretskii
2005-08-12 20:45 ` Bob Rossi
2005-08-12 20:49 ` Daniel Jacobowitz
2005-08-13 1:11 ` Bob Rossi
2005-08-13 1:15 ` Daniel Jacobowitz
2005-08-13 11:07 ` Eli Zaretskii
2005-08-12 20:54 ` Mark Kettenis
2005-08-13 15:05 ` Bob Rossi
2005-08-12 21:01 ` Daniel Jacobowitz
2005-08-13 11:13 ` Eli Zaretskii
2005-08-12 17:03 ` Jim Ingham
2005-08-13 0:33 ` Bob Rossi
2005-08-13 0:44 ` Jim Ingham [this message]
2005-08-13 5:04 ` Bob Rossi
2005-08-13 6:47 ` Daniel Jacobowitz
2005-08-13 11:06 ` Jim Ingham
2005-08-13 14:51 ` Bob Rossi
2005-08-13 16:55 ` Daniel Jacobowitz
2005-08-13 12:53 ` Eli Zaretskii
2005-08-13 21:52 ` Mark Kettenis
2005-08-13 0:22 ` Daniel Jacobowitz
2005-08-11 10:10 ` Daniel Jacobowitz
2005-08-18 13:28 Nick Roberts
2005-08-19 0:52 ` Mark Kettenis
-- strict thread matches above, loose matches on Subject: below --
2005-08-17 3:18 Nick Roberts
[not found] <1124238360.5670.ezmlm@sources.redhat.com>
2005-08-17 1:10 ` Jim Ingham
2005-08-15 2:15 Nick Roberts
2005-08-15 2:13 Nick Roberts
2005-08-15 4:26 ` Daniel Jacobowitz
2005-08-15 10:03 ` Nick Roberts
2005-08-16 0:04 ` Bob Rossi
2005-08-16 0:33 ` Nick Roberts
2005-08-16 0:43 ` Daniel Jacobowitz
2005-08-16 3:54 ` Bob Rossi
2005-08-08 5:20 Nick Roberts
2005-08-08 13:05 ` Daniel Jacobowitz
2005-08-08 18:23 ` Jim Ingham
2005-08-09 17:32 ` Nick Roberts
2005-08-21 22:09 ` Nick Roberts
2005-08-24 2:20 ` Stan Shebs
2005-08-24 16:59 ` Nick Roberts
2005-08-24 20:15 ` Jim Ingham
2005-08-24 20:48 ` Nick Roberts
2005-08-27 12:09 ` Stan Shebs
2005-09-12 3:20 ` Nick Roberts
2005-09-12 3:40 ` Daniel Jacobowitz
2005-09-19 10:30 ` Nick Roberts
2005-09-19 13:17 ` Daniel Jacobowitz
2005-09-19 22:12 ` Nick Roberts
2005-09-19 22:17 ` Nick Roberts
2005-09-19 22:32 ` Daniel Jacobowitz
2005-10-03 3:20 ` Nick Roberts
2005-10-03 13:18 ` Daniel Jacobowitz
2005-10-03 20:28 ` Nick Roberts
2005-10-03 20:31 ` Daniel Jacobowitz
2005-10-03 21:39 ` Stan Shebs
2005-10-03 21:50 ` Jim Ingham
2005-10-03 21:59 ` Daniel Jacobowitz
2005-10-03 22:01 ` Daniel Jacobowitz
2006-03-28 0:40 ` Nick Roberts
2006-03-28 22:12 ` Daniel Jacobowitz
2006-03-28 22:36 ` Nick Roberts
2006-03-28 23:13 ` Daniel Jacobowitz
2005-08-08 21:00 ` Eli Zaretskii
2005-08-09 17:52 ` Nick Roberts
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=C1459687-8117-47C7-8236-19A8B36B301A@apple.com \
--to=jingham@apple.com \
--cc=bob@brasko.net \
--cc=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
/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