From: Dmitry Dzhus <dima@sphinx.net.ru>
To: emacs-devel@gnu.org
Subject: Re: other weird gdb-mi problems
Date: Thu, 27 Aug 2009 17:57:56 +0400 [thread overview]
Message-ID: <87hbvt9x5n.fsf@sphinx.net.ru> (raw)
In-Reply-To: 19093.50389.972379.110708@totara.tehura.co.nz
Nick Roberts wrote:
> It's an Emacs problem. The CLI commands "up" and "down", don't emit any
> GDB/MI notifications so Emacs doen't know that the display needs updating.
I've changed `gdb-mi.el` to append `--frame` and `--thread` options to
every command it sends to GDB. This is is the recommended way to use
GDB/MI, because we can put all frame/thread selection logic to
frontend-land completely, without relying on internal state of GDB.
That's the way `gdb-mi.el` works now — select frame/thread on frontend
side and append --thread/--frame appropriately. `gdb-thread-number` and
`gdb-frame-number` variables reflect current thread (probably
buffer-local) and frame selected by Emacs.
When we type `thread N` in GUD console, GDB emits
`=thread-selected,id=N` notification. Emacs reads this and changes
`gdb-thread-number`.
No such notification is provided when we type `frame M`, `up` or `down`.
As the result, Emacs can't notice the change of current frame.
Previously `gdb-mi.el` deducted current frame from internal state of
GDB. I can revert changes to follow this behaviour again, but the real
fix would involve implementing `=frame-selected` notification in GDB.
> http://sourceware.org/ml/gdb-patches/2008-04/msg00377.html but there hasn't
> been much interest.
It's pity that these patches didn't make it to GDB upstream :( I see now
that current `=thread-selected` notification implementation in GDB uses
a different and perhaps less elegant approach. I've posted a patch to
GDB mailing list which adds =frame-selected notification following the
current approach. I hope that GDB upstream accepts the patch or
reevaluates the one you'd sent before.
--
Happy Hacking.
http://sphinx.net.ru
む
next prev parent reply other threads:[~2009-08-27 13:57 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-26 7:49 other weird gdb-mi problems Miles Bader
2009-08-26 17:19 ` Eli Zaretskii
2009-08-26 23:27 ` Nick Roberts
2009-08-27 1:49 ` Miles Bader
2009-08-27 1:50 ` Miles Bader
2009-08-27 4:52 ` Nick Roberts
2009-08-27 9:42 ` Miles Bader
2009-08-28 3:05 ` Nick Roberts
2009-08-27 13:57 ` Dmitry Dzhus [this message]
2009-08-27 23:36 ` 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=87hbvt9x5n.fsf@sphinx.net.ru \
--to=dima@sphinx.net.ru \
--cc=emacs-devel@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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.