diff options
| author | Sergio Durigan Junior | 2013-07-12 21:17:17 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-07-12 21:17:17 +0300 |
| commit | a7d8babb09b9839bad284deea62cda6ef9f6b3ad (patch) | |
| tree | 03fe41e98f1aa76cd00712f7e57b88f6193b53ca | |
| parent | 671d4bfc55b191cd4cbb7205d95d757a7748c785 (diff) | |
| download | emacs-a7d8babb09b9839bad284deea62cda6ef9f6b3ad.tar.gz emacs-a7d8babb09b9839bad284deea62cda6ef9f6b3ad.zip | |
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.
| -rw-r--r-- | lisp/ChangeLog | 13 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 23 |
2 files changed, 25 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e312fde4672..b4f3721dd93 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2013-07-12 Sergio Durigan Junior <sergiodj@riseup.net> (tiny change) | ||
| 2 | |||
| 3 | * progmodes/gdb-mi.el (gdb-strip-string-backslash): New function. | ||
| 4 | (gdb-send): Handle continued commands. | ||
| 5 | |||
| 6 | * simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG. | ||
| 7 | (Bug#14842) | ||
| 8 | |||
| 1 | 2013-07-12 Juanma Barranquero <lekktu@gmail.com> | 9 | 2013-07-12 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 10 | ||
| 3 | * desktop.el (desktop--v2s): Remove unused local variable. | 11 | * desktop.el (desktop--v2s): Remove unused local variable. |
| @@ -9,11 +17,6 @@ | |||
| 9 | 17 | ||
| 10 | * emacs-lisp/map-ynp.el (map-y-or-n-p): Fix last change. | 18 | * emacs-lisp/map-ynp.el (map-y-or-n-p): Fix last change. |
| 11 | 19 | ||
| 12 | 2013-07-12 Eli Zaretskii <eliz@gnu.org> | ||
| 13 | |||
| 14 | * simple.el (next-line, previous-line): Document TRY-VSCROLL and ARG. | ||
| 15 | (Bug#14842) | ||
| 16 | |||
| 17 | 2013-07-12 Glenn Morris <rgm@gnu.org> | 20 | 2013-07-12 Glenn Morris <rgm@gnu.org> |
| 18 | 21 | ||
| 19 | * doc-view.el: Require cl-lib at runtime too. | 22 | * doc-view.el: Require cl-lib at runtime too. |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 2c4d6a0e3d7..10472ec5815 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -1759,6 +1759,9 @@ static char *magick[] = { | |||
| 1759 | As long as GDB is in the recursive reading loop, it does not expect | 1759 | As long as GDB is in the recursive reading loop, it does not expect |
| 1760 | commands to be prefixed by \"-interpreter-exec console\".") | 1760 | commands to be prefixed by \"-interpreter-exec console\".") |
| 1761 | 1761 | ||
| 1762 | (defun gdb-strip-string-backslash (string) | ||
| 1763 | (replace-regexp-in-string "\\\\$" "" string)) | ||
| 1764 | |||
| 1762 | (defun gdb-send (proc string) | 1765 | (defun gdb-send (proc string) |
| 1763 | "A comint send filter for gdb." | 1766 | "A comint send filter for gdb." |
| 1764 | (with-current-buffer gud-comint-buffer | 1767 | (with-current-buffer gud-comint-buffer |
| @@ -1766,10 +1769,15 @@ commands to be prefixed by \"-interpreter-exec console\".") | |||
| 1766 | (remove-text-properties (point-min) (point-max) '(face)))) | 1769 | (remove-text-properties (point-min) (point-max) '(face)))) |
| 1767 | ;; mimic <RET> key to repeat previous command in GDB | 1770 | ;; mimic <RET> key to repeat previous command in GDB |
| 1768 | (if (not (string= "" string)) | 1771 | (if (not (string= "" string)) |
| 1769 | (setq gdb-last-command string) | 1772 | (if gdb-continuation |
| 1770 | (if gdb-last-command (setq string gdb-last-command))) | 1773 | (setq gdb-last-command (concat gdb-continuation |
| 1771 | (if (or (string-match "^-" string) | 1774 | (gdb-strip-string-backslash string) |
| 1772 | (> gdb-control-level 0)) | 1775 | " ")) |
| 1776 | (setq gdb-last-command (gdb-strip-string-backslash string))) | ||
| 1777 | (if gdb-last-command (setq string gdb-last-command)) | ||
| 1778 | (setq gdb-continuation nil)) | ||
| 1779 | (if (and (not gdb-continuation) (or (string-match "^-" string) | ||
| 1780 | (> gdb-control-level 0))) | ||
| 1773 | ;; Either MI command or we are feeding GDB's recursive reading loop. | 1781 | ;; Either MI command or we are feeding GDB's recursive reading loop. |
| 1774 | (progn | 1782 | (progn |
| 1775 | (setq gdb-first-done-or-error t) | 1783 | (setq gdb-first-done-or-error t) |
| @@ -1779,10 +1787,13 @@ commands to be prefixed by \"-interpreter-exec console\".") | |||
| 1779 | (setq gdb-control-level (1- gdb-control-level)))) | 1787 | (setq gdb-control-level (1- gdb-control-level)))) |
| 1780 | ;; CLI command | 1788 | ;; CLI command |
| 1781 | (if (string-match "\\\\$" string) | 1789 | (if (string-match "\\\\$" string) |
| 1782 | (setq gdb-continuation (concat gdb-continuation string "\n")) | 1790 | (setq gdb-continuation |
| 1791 | (concat gdb-continuation (gdb-strip-string-backslash | ||
| 1792 | string) | ||
| 1793 | " ")) | ||
| 1783 | (setq gdb-first-done-or-error t) | 1794 | (setq gdb-first-done-or-error t) |
| 1784 | (let ((to-send (concat "-interpreter-exec console " | 1795 | (let ((to-send (concat "-interpreter-exec console " |
| 1785 | (gdb-mi-quote string) | 1796 | (gdb-mi-quote (concat gdb-continuation string " ")) |
| 1786 | "\n"))) | 1797 | "\n"))) |
| 1787 | (if gdb-enable-debug | 1798 | (if gdb-enable-debug |
| 1788 | (push (cons 'mi-send to-send) gdb-debug-log)) | 1799 | (push (cons 'mi-send to-send) gdb-debug-log)) |