From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Daimrod Newsgroups: gmane.emacs.bugs Subject: bug#14597: 24.3.50; Can't stop the program being debugged with gdb-mi Date: Tue, 25 Jun 2013 18:53:23 +0200 Message-ID: <87vc52qgho.fsf@tanger.home> References: <87a9mvn4i8.fsf@tanger.home> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1372179023 444 80.91.229.3 (25 Jun 2013 16:50:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 25 Jun 2013 16:50:23 +0000 (UTC) To: 14597@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 25 18:50:21 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UrWRg-0007Kx-Tt for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jun 2013 18:50:21 +0200 Original-Received: from localhost ([::1]:41403 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrWRg-0007ll-Ko for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jun 2013 12:50:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57274) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrWRZ-0007hi-1s for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 12:50:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UrWRX-0003gM-Ji for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 12:50:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:46429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UrWRX-0003gH-GK for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 12:50:11 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UrWRW-0001ik-E4 for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2013 12:50:10 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Daimrod Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jun 2013 16:50:10 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14597 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14597-submit@debbugs.gnu.org id=B14597.13721789676533 (code B ref 14597); Tue, 25 Jun 2013 16:50:10 +0000 Original-Received: (at 14597) by debbugs.gnu.org; 25 Jun 2013 16:49:27 +0000 Original-Received: from localhost ([127.0.0.1]:40740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrWQo-0001hG-IN for submit@debbugs.gnu.org; Tue, 25 Jun 2013 12:49:27 -0400 Original-Received: from mail-wi0-f176.google.com ([209.85.212.176]:55450) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UrWQl-0001gs-4s for 14597@debbugs.gnu.org; Tue, 25 Jun 2013 12:49:23 -0400 Original-Received: by mail-wi0-f176.google.com with SMTP id ey16so1038514wid.3 for <14597@debbugs.gnu.org>; Tue, 25 Jun 2013 09:49:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version:content-type; bh=eeQIFVylwKodm/2hqa2cYgj3JYVbVldE6HgqRA4YCMM=; b=hf4SVRpAuC0B1jAd2Mwm5yIRuKF0tSOEFzAkqJ8zlrdBaH3x/xJX/97PFC/NI1DYpS YXSRNBdY+gvCRYQxYIsnUkkjiPX6O1g9pHks9cFC52yVrWfjcqHxmcCqvWmVQqB4nWYO +VqjmDF+OLI2yRPiZumq75KJUrjlziKpCUx+IyojlQsNXmBFZzTHgKtjSh7Sv/wSa67N 1mK1GayH7SurA4Kdw5nblymHyK13CmHAQXZ2Dtdbj5rBcC5BCj0OMaTB/WAeQEiLKfZg jYyxP7qgISKkWjURdNLb0HpIy1J0PVOmcJC/C3exEgYjwqh92OLFH1AwxL5zQ+fksMoQ 867A== X-Received: by 10.180.187.37 with SMTP id fp5mr9910186wic.5.1372178956761; Tue, 25 Jun 2013 09:49:16 -0700 (PDT) Original-Received: from localhost (ANantes-653-1-33-251.w109-211.abo.wanadoo.fr. [109.211.28.251]) by mx.google.com with ESMTPSA id o14sm5321798wiv.3.2013.06.25.09.49.15 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 25 Jun 2013 09:49:16 -0700 (PDT) In-Reply-To: <87a9mvn4i8.fsf@tanger.home> ("=?UTF-8?Q?Gr=C3=A9goire?= Jadi"'s message of "Wed, 12 Jun 2013 09:59:43 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75577 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable daimrod@gmail.com (Gr=C3=A9goire Jadi) writes: > `gdb-io-stop' fails to stop the program being debugged when using the > GDB/MI interface (M-x gdb run gdb -i=3Dmi). C-c C-z also fails to stop the > program. However, no error is reported, it fails silently, without doing > anything. > > Recipe: > > emacs -Q > M-x cd RET path/to/emacs-sources/src RET > M-x gdb RET (edit the minibuffer to use "gdb -i=3Dmi ./emacs") RET > gdb> run -Q > [emacs starts] > Now try C-c C-z in *gud-emacs* or M-x gdb-io-stop RET > > This bug is only present when using the GDB/MI interpreter. It doesn't > happen using just the GUD interaction buffer interface (with M-x gud-gdb > RET), C-c C-z and `gdb-io-stop' can be used to stop the program being > debugged in *gud-emacs*. Here a workaround, it sends a raw string with "C-z" instead of a signal. There is probably a nicer solution but I don't know `gdb-mi.el' and the GDB/MI interface enough. With this, C-c C-z can be used in the gdb-inferior-io buffer to stop the program being debugged. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-lisp-progmodes-gdb-mi.el-gdb-io-stop-Temporarily-wor.patch >From 30217881358cb685d8f1327dfb476f765a0d48a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Jadi?= Date: Tue, 25 Jun 2013 18:40:07 +0200 Subject: [PATCH] * lisp/progmodes/gdb-mi.el (gdb-io-stop): Temporarily workaround for bug #14597. Send raw "C-z" via `gdb-inferior-io' buffer instead of sending a signal. --- lisp/progmodes/gdb-mi.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 0b52302..a597a32 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -1646,8 +1646,9 @@ this trigger is subscribed to `gdb-buf-publisher' and called with (defun gdb-io-stop () "Stop the program being debugged." (interactive) - (stop-process - (get-buffer-process gud-comint-buffer) comint-ptyp)) + (process-send-string (get-buffer-process + (gdb-get-buffer-create 'gdb-inferior-io)) + (kbd "C-z"))) (defun gdb-io-eof () "Send end-of-file to the program being debugged." -- 1.8.0.2722.gc0242e5 --=-=-= Content-Type: text/plain -- Daimrod/Greg --=-=-=--