From: Eli Zaretskii <eliz@gnu.org>
To: Vladimir Nikishkin <lockywolf@gmail.com>
Cc: 40250-done@debbugs.gnu.org
Subject: bug#40250: 26.3; gdb-mode incorrectly handles gdb's `explore' command
Date: Sat, 04 Apr 2020 14:19:31 +0300 [thread overview]
Message-ID: <83h7xzv6po.fsf@gnu.org> (raw)
In-Reply-To: <CA+A2iZaSAcHTf8yOf_d_ye_RzPOJ8yDZN2wv58WMnSUQCY0v=g@mail.gmail.com> (message from Vladimir Nikishkin on Mon, 30 Mar 2020 22:49:28 +0800)
> From: Vladimir Nikishkin <lockywolf@gmail.com>
> Date: Mon, 30 Mar 2020 22:49:28 +0800
>
> I'm not sure it matters much. The main thing is that exploration works now.
OK, I've pushed the fix to the master branch. the full patch appears
below, so you could use it with your version of Emacs right now.
Thanks again for help in testing the fix.
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 7fb3687..0750683 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -1850,7 +1850,8 @@ gdb-control-commands-regexp
"\\|def\\(i\\(ne?\\)?\\)?\\|doc\\(u\\(m\\(e\\(nt?\\)?\\)?\\)?\\)?\\|"
gdb-python-guile-commands-regexp
"\\|while-stepping\\|stepp\\(i\\(ng?\\)?\\)?\\|ws\\|actions"
- "\\)\\([[:blank:]]+\\([^[:blank:]]*\\)\\)?$")
+ "\\|expl\\(o\\(r\\e?\\)?\\)?"
+ "\\)\\([[:blank:]]+\\([^[:blank:]]*\\)\\)*$")
"Regexp matching GDB commands that enter a recursive reading loop.
As long as GDB is in the recursive reading loop, it does not expect
commands to be prefixed by \"-interpreter-exec console\".")
@@ -2508,7 +2509,13 @@ gud-gdbmi-marker-filter
gdb-filter-output)
-(defun gdb-gdb (_output-field))
+(defun gdb-gdb (_output-field)
+ ;; This is needed because the "explore" command is not ended by the
+ ;; likes of "end" or "quit", but instead by a RET at the approriate
+ ;; place, and we know we have exited "explore" when we get the
+ ;; "(gdb)" prompt.
+ (and (> gdb-control-level 0)
+ (setq gdb-control-level (1- gdb-control-level))))
(defun gdb-shell (output-field)
(setq gdb-filter-output
next prev parent reply other threads:[~2020-04-04 11:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-27 7:25 bug#40250: 26.3; gdb-mode incorrectly handles gdb's `explore' command Vladimir Nikishkin
2020-03-28 13:05 ` Eli Zaretskii
2020-03-28 13:34 ` Vladimir Nikishkin
2020-03-28 13:54 ` Eli Zaretskii
[not found] ` <CA+A2iZZCqqnhtrmMOsd0xOxqabNu2aBg1iusJ+PW0r0URTxY5w@mail.gmail.com>
[not found] ` <83zhc05vp7.fsf@gnu.org>
[not found] ` <CA+A2iZZXeZn-GMp91x47Y7p5Y5v3pPO6K51iTB=UFNiEWLFtQQ@mail.gmail.com>
[not found] ` <83zhby2ajh.fsf@gnu.org>
2020-03-30 14:46 ` Vladimir Nikishkin
2020-03-30 14:49 ` Vladimir Nikishkin
2020-04-04 11:19 ` Eli Zaretskii [this message]
2020-03-30 15:55 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83h7xzv6po.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=40250-done@debbugs.gnu.org \
--cc=lockywolf@gmail.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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).