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#23720: 25.0.94; Issues with GUD (gdb-mi) after upgrade from Emacs 23 to 24/25 Date: Tue, 07 Jun 2016 21:54:58 +0300 Message-ID: <8337oosubh.fsf@gnu.org> References: <5756941E.3000700@oracle.com> <837fe0syx5.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1465325832 14443 80.91.229.3 (7 Jun 2016 18:57:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Jun 2016 18:57:12 +0000 (UTC) Cc: 23720@debbugs.gnu.org To: guilhem.bichot@oracle.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 07 20:57:02 2016 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 1bAM9l-0002lu-Bc for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jun 2016 20:55:17 +0200 Original-Received: from localhost ([::1]:52458 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAM9h-0006nC-Ab for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jun 2016 14:55:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45793) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAM9b-0006kT-80 for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2016 14:55:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAM9W-0008Ve-4R for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2016 14:55:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46747) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAM9W-0008Va-1T for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2016 14:55:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bAM9V-0006au-Ss for bug-gnu-emacs@gnu.org; Tue, 07 Jun 2016 14:55:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jun 2016 18:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23720 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23720-submit@debbugs.gnu.org id=B23720.146532568225319 (code B ref 23720); Tue, 07 Jun 2016 18:55:01 +0000 Original-Received: (at 23720) by debbugs.gnu.org; 7 Jun 2016 18:54:42 +0000 Original-Received: from localhost ([127.0.0.1]:59084 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAM9B-0006aJ-PF for submit@debbugs.gnu.org; Tue, 07 Jun 2016 14:54:41 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:54783) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bAM99-0006a6-Qe for 23720@debbugs.gnu.org; Tue, 07 Jun 2016 14:54:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bAM90-0008UH-G9 for 23720@debbugs.gnu.org; Tue, 07 Jun 2016 14:54:34 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bAM90-0008U7-D3; Tue, 07 Jun 2016 14:54:30 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4744 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bAM8x-0004Bf-Hp; Tue, 07 Jun 2016 14:54:29 -0400 In-reply-to: <837fe0syx5.fsf@gnu.org> (message from Eli Zaretskii on Tue, 07 Jun 2016 20:15:34 +0300) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:119226 Archived-At: > Date: Tue, 07 Jun 2016 20:15:34 +0300 > From: Eli Zaretskii > Cc: 23720@debbugs.gnu.org > > > ISSUE 3: STEPPING OUT DOESN'T PRINT RETURN VALUE > > ================================================ > > > > The program is in the stepped-in function, clicking "Step out" steps out > > of it, but this doesn't print the returned value. > > Emacs23 prints it ("Value returned is $1 = false"). > > Looks like a missing feature in gdb-mi: the return value sent by MI is > not processed. Please try the patch below, I think it will fix this. diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 5ad101d..195acaf 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -2488,7 +2488,9 @@ gdb-stopped ;; Reason is available with target-async only (let* ((result (gdb-json-string output-field)) (reason (bindat-get-field result 'reason)) - (thread-id (bindat-get-field result 'thread-id))) + (thread-id (bindat-get-field result 'thread-id)) + (retval (bindat-get-field result 'return-value)) + (varnum (bindat-get-field result 'gdb-result-var))) ;; -data-list-register-names needs to be issued for any stopped ;; thread @@ -2514,6 +2516,11 @@ gdb-stopped (if (string-equal reason "exited-normally") (setq gdb-active-process nil)) + (when (and retval varnum) + (setq gdb-filter-output + (concat gdb-filter-output + (format "Value returned is %s = %s\n" varnum retval)))) + ;; Select new current thread. ;; Don't switch if we have no reasons selected