(gdbmi-record-list, gdb-shell): Redirect shell command output to GUD buffer (Emacs bug #3794) diff -r 3ba511c84066 gdb-mi.el --- a/gdb-mi.el +++ b/gdb-mi.el @@ -1418,7 +1418,8 @@ (gdb-stopped . "\\*stopped,?\\(.*?\n\\)") (gdb-running . "\\*running,\\(.*?\n\\)") (gdb-thread-created . "=thread-created,\\(.*?\n\\)") - (gdb-thread-exited . "=thread-exited,\\(.*?\n\\)"))) + (gdb-thread-exited . "=thread-exited,\\(.*?\n\\)") + (gdb-shell . "\\(\\(?:^.+\n\\)+\\)"))) (defun gud-gdbmi-marker-filter (string) "Filter GDB/MI output." @@ -1476,7 +1477,10 @@ gdb-filter-output)) (defun gdb-gdb (output-field)) - +(defun gdb-shell (output-field) + (let ((gdb-output-sink gdb-output-sink)) + (setq gdb-filter-output + (concat output-field gdb-filter-output)))) ;; gdb-invalidate-threads is defined to accept 'update-threads signal (defun gdb-thread-created (output-field)) (defun gdb-thread-exited (output-field)