From: Tom Tromey <tromey@redhat.com>
To: Dmitry Dzhus <dima@sphinx.net.ru>
Cc: gdb-patches@sources.redhat.com
Subject: Re: =frame-selected MI notification
Date: Thu, 27 Aug 2009 20:54:00 -0000 [thread overview]
Message-ID: <m3k50pq8vl.fsf@fleche.redhat.com> (raw)
In-Reply-To: <87iqg99xb5.fsf@sphinx.net.ru> (Dmitry Dzhus's message of "Thu, 27 Aug 2009 17:54:38 +0400")
>>>>> "Dmitry" == Dmitry Dzhus <dima@sphinx.net.ru> writes:
Dmitry> Nick Roberts once posted a patch which implements both =thread-selected
Dmitry> and =frame-selected via observers:
Dmitry> http://sourceware.org/ml/gdb-patches/2008-04/msg00377.html.
I didn't see any discussion of this patch in the archives.
Was it just forgotten?
In general I think that it makes sense to have MI notifications for
state changes caused by CLI commands.
Dmitry> Current implementation of =thread-selected in mi-main.c uses a
Dmitry> different approach, comparing current thread ID before and after
Dmitry> executing a command in `mi_execute_command` function. My patch
Dmitry> does the same for frame level. I don't know how is it
Dmitry> technically better. I think it would be nice if somebody
Dmitry> reviewed Nick's patch once again or at least accepted the one
Dmitry> proposed by me.
I tend to prefer Nick's approach. I like the use of observers.
I would want to hear Vladimir's opinion as MI maintainer before
approving anything though.
Dmitry> -struct frame_info
Dmitry> -{
Dmitry> - /* Level of this frame. The inner-most (youngest) frame is at level
Moving struct frame_info from frame.c to frame.h is definitely not ok.
The point of the current approach is that frame_info is opaque and
cannot be directly manipulated by other modules. I think this is a good
quality worth preserving.
But ...
Dmitry> + if (fi->level != previous_frame->level)
You should probably just get the frame_id for the previous frame, before
the command, and then compare it to the frame_id after the command
(using frame_id_eq).
Tom
next prev parent reply other threads:[~2009-08-27 20:50 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-27 17:01 Dmitry Dzhus
2009-08-27 20:54 ` Tom Tromey [this message]
2009-08-28 6:44 ` Vladimir Prus
2009-08-29 5:40 ` Nick Roberts
2009-08-29 7:53 ` Vladimir Prus
2009-08-31 23:11 ` Tom Tromey
2009-09-01 15:13 ` Dmitry Dzhus
2009-08-31 23:19 ` Tom Tromey
2009-09-01 5:35 ` Vladimir Prus
2009-09-02 19:35 ` Tom Tromey
2009-09-01 18:54 ` Dmitry Dzhus
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=m3k50pq8vl.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=dima@sphinx.net.ru \
--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