[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0878279809c: Fix GDB save history (bug#59838)
From: |
Eli Zaretskii |
Subject: |
master 0878279809c: Fix GDB save history (bug#59838) |
Date: |
Sat, 10 Dec 2022 08:39:54 -0500 (EST) |
branch: master
commit 0878279809c8acc8de703ae9774e89695b4ffc37
Author: Manuel Giraud <manuel@ledu-giraud.fr>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix GDB save history (bug#59838)
* lisp/progmodes/gdb-mi.el (gdb-reset): Save GDB comint history.
(gdb-delchar-or-quit): Remove useless progn and add comment.
---
lisp/progmodes/gdb-mi.el | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 9cbee50ce31..eb0e5b0481c 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -1113,13 +1113,13 @@ no input, and GDB is waiting for input."
(process-live-p proc)
(not gud-running)
(= (point) (marker-position (process-mark proc))))
- ;; Sending an EOF does not work with GDB-MI; submit an
- ;; explicit quit command.
- (progn
- (if (> gdb-control-level 0)
- (process-send-eof proc)
- (insert "quit")
- (comint-send-input t t)))
+ ;; Exit a recursive reading loop or quit.
+ (if (> gdb-control-level 0)
+ (process-send-eof proc)
+ ;; Sending an EOF does not work with GDB-MI; submit an
+ ;; explicit quit command.
+ (insert "quit")
+ (comint-send-input t t))
(delete-char arg))))
(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")
@@ -5157,6 +5157,8 @@ This arrangement depends on the values of variable
(defun gdb-reset ()
"Exit a debugging session cleanly.
Kills the gdb buffers, and resets variables and the source buffers."
+ ;; Save GDB history
+ (comint-write-input-ring)
;; The gdb-inferior buffer has a pty hooked up to the main gdb
;; process. This pty must be deleted explicitly.
(let ((pty (get-process "gdb-inferior")))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0878279809c: Fix GDB save history (bug#59838),
Eli Zaretskii <=