From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#14847: 24.1; gdb-mi.el does not handle backslashes as quotes Date: Fri, 12 Jul 2013 11:50:33 +0300 Message-ID: <83hag05fhi.fsf@gnu.org> References: <87r4f4qvuv.fsf@riseup.net> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1373619126 5592 80.91.229.3 (12 Jul 2013 08:52:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 12 Jul 2013 08:52:06 +0000 (UTC) Cc: 14847@debbugs.gnu.org To: Sergio Durigan Junior Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 12 10:52:08 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 1UxZ5D-0006VI-T2 for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Jul 2013 10:52:08 +0200 Original-Received: from localhost ([::1]:55187 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxZ5D-0006n2-JM for geb-bug-gnu-emacs@m.gmane.org; Fri, 12 Jul 2013 04:52:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxZ5A-0006ml-8p for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2013 04:52:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UxZ58-0000iU-OU for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2013 04:52:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UxZ58-0000iH-Kr for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2013 04:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1UxZ58-0005P7-BJ for bug-gnu-emacs@gnu.org; Fri, 12 Jul 2013 04:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 12 Jul 2013 08:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14847 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14847-submit@debbugs.gnu.org id=B14847.137361906220621 (code B ref 14847); Fri, 12 Jul 2013 08:52:02 +0000 Original-Received: (at 14847) by debbugs.gnu.org; 12 Jul 2013 08:51:02 +0000 Original-Received: from localhost ([127.0.0.1]:49592 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UxZ49-0005MS-Pp for submit@debbugs.gnu.org; Fri, 12 Jul 2013 04:51:02 -0400 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:38028) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1UxZ47-0005Ls-Ct for 14847@debbugs.gnu.org; Fri, 12 Jul 2013 04:51:00 -0400 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0MPT00600F3AFE00@a-mtaout22.012.net.il> for 14847@debbugs.gnu.org; Fri, 12 Jul 2013 11:50:39 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MPT006L4F8E7T60@a-mtaout22.012.net.il>; Fri, 12 Jul 2013 11:50:39 +0300 (IDT) In-reply-to: <87r4f4qvuv.fsf@riseup.net> X-012-Sender: halo1@inter.net.il 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:76270 Archived-At: > From: Sergio Durigan Junior > Date: Fri, 12 Jul 2013 00:51:20 -0300 > > If you start gdb-mi.el (on Emacs 24.1), and try to use backslashes to > quote/break long lines, it is not handled correctly. For example, > suppose your program being debugged inside GDB takes 3 arguments. You > could run it with: > > (gdb) file myprogram > Reading symbols from myprogram...done. > (gdb) run \ > first_arg \ > second_arg \ > third_arg > > GDB should correctly run the binary using the 3 args. However, inside > Emacs, you receive an error: > > Undefined command: "third_arg". Try "help". > > This is because gdb-mi.el is not handling the backslashes correctly. > The error is specifically on the function `gdb_send', and the patch > inlined in this message fixes this. The patch can also be seen on: > > > > And there is also a GDB bug related to this issue: > > Your patch doesn't seem to work for me. I tried on GNU/Linux and on MS-Windows, and in both cases I get the same error. Here's the recipe I tried (after applying your latest patch and rebuilding Emacs): emacs -Q M-x gdb RET gdb -i=mi ./src/emacs RET (gdb) break main (gdb) run \ -Q When I type RET after "-Q", I get an error: Undefined MI command: Q What am I doing wrong? Thanks.