emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master f71afd6: Support the "explore" command in gdb-mi.el


From: Eli Zaretskii
Subject: master f71afd6: Support the "explore" command in gdb-mi.el
Date: Sat, 4 Apr 2020 07:17:56 -0400 (EDT)

branch: master
commit f71afd600aef77d3c7248ae0e94b8c55fb2c5eb2
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Support the "explore" command in gdb-mi.el
    
    * lisp/progmodes/gdb-mi.el (gdb-control-commands-regexp): Add
    support for "explore", "explore value", and "explore type".
    Allow more than one word after control commands.
    (gdb-gdb): Decrease gdb-control-level when we get the "(gdb)"
    prompt, which signals that "explore" exited.  (Bug#40250)
---
 lisp/progmodes/gdb-mi.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

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 @@ static char *magick[] = {
    "\\|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 @@ file names include non-ASCII characters."
 
   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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]