all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mike Gulick <mike.gulick@mathworks.com>
To: 29020@debbugs.gnu.org, Mike Gulick <mgulick@mathworks.com>
Subject: bug#29020: [PATCH] gdb-mi doesn't display prompt when attaching
Date: Fri, 27 Oct 2017 11:28:00 -0400	[thread overview]
Message-ID: <385b433a-8b6d-7591-c19c-6064ef83d9f4@mathworks.com> (raw)
In-Reply-To: <handler.29020.B.15090553751145.ack@debbugs.gnu.org>

This patch is pretty straightforward.  When we write a console message
to the GUD buffer, we now reset a variable that is used to determine
whether to print the gdb prompt on the next '^done' or '*stopped'
message.

diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 7723f70..fb6e1a5 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -2188,7 +2188,10 @@ a GDB/MI reply message."
 
 (defun gdbmi-bnf-console-stream-output (c-string)
   "Handler for the console-stream-output GDB/MI output grammar rule."
-  (gdb-console c-string))
+  (gdb-console c-string)
+  ;; We've written to the GUD console, so we should print the prompt after the
+  ;; next result-class or async-class.
+  (setq gdb-first-done-or-error t))
 
 (defun gdbmi-bnf-target-stream-output (_c-string)
   "Handler for the target-stream-output GDB/MI output grammar rule."





  parent reply	other threads:[~2017-10-27 15:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-26 21:43 bug#29020: 25.1; gdb-mi doesn't display prompt when attaching Mike Gulick
     [not found] ` <handler.29020.B.15090553751145.ack@debbugs.gnu.org>
2017-10-27 15:28   ` Mike Gulick [this message]
2017-10-27 17:35     ` bug#29020: [PATCH] " Eli Zaretskii
2017-10-30 14:23       ` Mike Gulick
2017-10-30 18:23         ` Eli Zaretskii
2017-11-04 11:37           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=385b433a-8b6d-7591-c19c-6064ef83d9f4@mathworks.com \
    --to=mike.gulick@mathworks.com \
    --cc=29020@debbugs.gnu.org \
    --cc=mgulick@mathworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.