]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix infinite recursion in gdb-mi.el
authorEli Zaretskii <eliz@gnu.org>
Sat, 24 Feb 2024 13:12:57 +0000 (15:12 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 3 Mar 2024 17:03:12 +0000 (18:03 +0100)
* lisp/progmodes/gdb-mi.el: (gdb-clear-partial-output)
(gdb-clear-inferior-io):  Set inhibit-read-only, to avoid
signaling errors in process filter.  (Bug#69327)

(cherry picked from commit 0530800175913769cb55ae7997ee4487a755a0a4)

lisp/progmodes/gdb-mi.el

index e08653f7f9e863dde6e6ec7a985c7346daa9833a..c8b086cfad2c3893ab921a003dbc33c527037880 100644 (file)
@@ -1880,7 +1880,8 @@ this trigger is subscribed to `gdb-buf-publisher' and called with
 
 (defun gdb-clear-inferior-io ()
   (with-current-buffer (gdb-get-buffer-create 'gdb-inferior-io)
-    (erase-buffer)))
+    (let ((inhibit-read-only t))
+      (erase-buffer))))
 \f
 
 (defconst breakpoint-xpm-data
@@ -2866,7 +2867,8 @@ current thread and update GDB buffers."
 
 (defun gdb-clear-partial-output ()
   (with-current-buffer (gdb-get-buffer-create 'gdb-partial-output-buffer)
-    (erase-buffer)))
+    (let ((inhibit-read-only t))
+      (erase-buffer))))
 
 ;; Parse GDB/MI result records: this process converts
 ;;  list      [...]      ->  list