From: Guilhem Bichot <guilhem.bichot@oracle.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 23720@debbugs.gnu.org
Subject: bug#23720: 25.0.94; Issues with GUD (gdb-mi) after upgrade from Emacs 23 to 24/25
Date: Thu, 9 Jun 2016 09:42:23 +0200 [thread overview]
Message-ID: <57591DDF.4030900@oracle.com> (raw)
In-Reply-To: <8337oosubh.fsf@gnu.org>
Hello,
Eli Zaretskii a écrit le 07/06/2016 20:54 :
>> Date: Tue, 07 Jun 2016 20:15:34 +0300
>> From: Eli Zaretskii <eliz@gnu.org>
>> 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
yes, it works! thanks!
Please, could you consider incorporating this into the next releases?
next prev parent reply other threads:[~2016-06-09 7:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-07 9:30 bug#23720: 25.0.94; Issues with GUD (gdb-mi) after upgrade from Emacs 23 to 24/25 Guilhem Bichot
2016-06-07 17:15 ` Eli Zaretskii
2016-06-07 18:54 ` Eli Zaretskii
2016-06-09 7:42 ` Guilhem Bichot [this message]
2016-06-10 9:00 ` Eli Zaretskii
2020-08-24 18:15 ` Lars Ingebrigtsen
2016-06-09 8:14 ` Guilhem Bichot
2016-06-09 12:17 ` Eli Zaretskii
2016-06-09 13:46 ` Guilhem Bichot
2016-06-09 14:12 ` Eli Zaretskii
2016-06-09 14:30 ` Guilhem Bichot
2016-06-09 14:36 ` Eli Zaretskii
2016-06-10 8:41 ` Guilhem Bichot
2016-06-10 9:52 ` 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=57591DDF.4030900@oracle.com \
--to=guilhem.bichot@oracle.com \
--cc=23720@debbugs.gnu.org \
--cc=eliz@gnu.org \
/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.