[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113397: Fix bug #14847 with continued GDB command l
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r113397: Fix bug #14847 with continued GDB command lines in gdb-mi.el. |
Date: |
Fri, 12 Jul 2013 18:18:19 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113397
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/14847
author: Sergio Durigan Junior <address@hidden>
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Fri 2013-07-12 21:17:17 +0300
message:
Fix bug #14847 with continued GDB command lines in gdb-mi.el.
lisp/progmodes/gdb-mi.el (gdb-strip-string-backslash): New function.
(gdb-send): Handle continued commands.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/progmodes/gdb-mi.el gdbmi.el-20100327132052-973a0aspo2g2bze8-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-07-12 11:21:01 +0000
+++ b/lisp/ChangeLog 2013-07-12 18:17:17 +0000
@@ -1,3 +1,11 @@
+2013-07-12 Sergio Durigan Junior <address@hidden> (tiny change)
+
+ * progmodes/gdb-mi.el (gdb-strip-string-backslash): New function.
+ (gdb-send): Handle continued commands.
+
+ * simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG.
+ (Bug#14842)
+
2013-07-12 Juanma Barranquero <address@hidden>
* desktop.el (desktop--v2s): Remove unused local variable.
@@ -9,11 +17,6 @@
* emacs-lisp/map-ynp.el (map-y-or-n-p): Fix last change.
-2013-07-12 Eli Zaretskii <address@hidden>
-
- * simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG.
- (Bug#14842)
-
2013-07-12 Glenn Morris <address@hidden>
* doc-view.el: Require cl-lib at runtime too.
=== modified file 'lisp/progmodes/gdb-mi.el'
--- a/lisp/progmodes/gdb-mi.el 2013-06-22 00:35:51 +0000
+++ b/lisp/progmodes/gdb-mi.el 2013-07-12 18:17:17 +0000
@@ -1759,6 +1759,9 @@
As long as GDB is in the recursive reading loop, it does not expect
commands to be prefixed by \"-interpreter-exec console\".")
+(defun gdb-strip-string-backslash (string)
+ (replace-regexp-in-string "\\\\$" "" string))
+
(defun gdb-send (proc string)
"A comint send filter for gdb."
(with-current-buffer gud-comint-buffer
@@ -1766,10 +1769,15 @@
(remove-text-properties (point-min) (point-max) '(face))))
;; mimic <RET> key to repeat previous command in GDB
(if (not (string= "" string))
- (setq gdb-last-command string)
- (if gdb-last-command (setq string gdb-last-command)))
- (if (or (string-match "^-" string)
- (> gdb-control-level 0))
+ (if gdb-continuation
+ (setq gdb-last-command (concat gdb-continuation
+ (gdb-strip-string-backslash string)
+ " "))
+ (setq gdb-last-command (gdb-strip-string-backslash string)))
+ (if gdb-last-command (setq string gdb-last-command))
+ (setq gdb-continuation nil))
+ (if (and (not gdb-continuation) (or (string-match "^-" string)
+ (> gdb-control-level 0)))
;; Either MI command or we are feeding GDB's recursive reading loop.
(progn
(setq gdb-first-done-or-error t)
@@ -1779,10 +1787,13 @@
(setq gdb-control-level (1- gdb-control-level))))
;; CLI command
(if (string-match "\\\\$" string)
- (setq gdb-continuation (concat gdb-continuation string "\n"))
+ (setq gdb-continuation
+ (concat gdb-continuation (gdb-strip-string-backslash
+ string)
+ " "))
(setq gdb-first-done-or-error t)
(let ((to-send (concat "-interpreter-exec console "
- (gdb-mi-quote string)
+ (gdb-mi-quote (concat gdb-continuation string "
"))
"\n")))
(if gdb-enable-debug
(push (cons 'mi-send to-send) gdb-debug-log))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113397: Fix bug #14847 with continued GDB command lines in gdb-mi.el.,
Eli Zaretskii <=