From: nickrob@snap.net.nz (Nick Roberts)
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: =frame-selected MI notification
Date: Sat, 29 Aug 2009 05:40:00 -0000 [thread overview]
Message-ID: <19096.47503.226488.945344@totara.tehura.co.nz> (raw)
In-Reply-To: <h77sng$i8o$1@ger.gmane.org>
> I'll review this patch later, but I wanted to clarify this point. The current
> codebase emits =thread-selected already, and it does not use observers,
> by design. The reason is that MI frontend is not actually interested in
> changes in GDB's current thread.
I think Emacs, and other frontends that have a console, will always be
interested in the current thread/selected frame. The behaviour of CLI
commands like up, down, print etc depend on it.
Of course, if GDB emits a notification then the frontend can always choose to
ignore it. If GDB doesn't emit a notification then the frontend has to send
an extra command to get the information it needs after after every user
command.
It's not only thread and frame changes that could be emitted as notifications.
Setting, deleting, disabling breakpoints with CLI commands could also emit
notifications. This would save having to send -break-list after every user
command.
> ...
> Furthermore, I do not think that observers for either thread or frame
> changes is good idea, design wise. The fact that gdb has current thread
> or current frame at the code level, is, IMNSHO, a design bug. Global
> variables are generally bad, and those two are certainly not exception.
> It's better not to make situation worse by adding new mechanism based
> on that design bug.
I think it would be hard to write a large C program with no global variables
but, in any case, the concept of current thread/selected frame seems to be a
great convenience when using GDB from the command line.
--
Nick http://www.inet.net.nz/~nickrob
next prev parent reply other threads:[~2009-08-29 5:16 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
2009-08-28 6:44 ` Vladimir Prus
2009-08-29 5:40 ` Nick Roberts [this message]
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=19096.47503.226488.945344@totara.tehura.co.nz \
--to=nickrob@snap.net.nz \
--cc=gdb-patches@sources.redhat.com \
--cc=vladimir@codesourcery.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