From: Pedro Alves <palves@redhat.com>
To: Jan Vrany <jan.vrany@fit.cvut.cz>, gdb-patches@sourceware.org
Subject: Re: [RFC] mi: add -a option to the "-data-disassemble" command
Date: Fri, 10 Aug 2018 10:41:00 -0000 [thread overview]
Message-ID: <71a83e5b-0662-e269-5b94-be7fc2ce5687@redhat.com> (raw)
In-Reply-To: <b7c482caf8203504717a65f15c2b92a1f2b278c4.camel@fit.cvut.cz>
On 08/10/2018 11:28 AM, Jan Vrany wrote:
> On Fri, 2018-08-10 at 10:47 +0100, Pedro Alves wrote:
>> On 08/10/2018 09:29 AM, Jan Vrany wrote:
>>> @@ -33095,6 +33101,9 @@ records, produced when trying to execute an undefined @sc{gdb/mi} command
>>> @item exec-run-start-option
>>> Indicates that the @code{-exec-run} command supports the @option{--start}
>>> option (@pxref{GDB/MI Program Execution}).
>>> +@item data-disassemble-a-option
>>> +Indicates that the @code{-data-disassemble} command supports the @option{-a}
>>> +option (@pxref{GDB/MI Data Manipulation}).
>>> @end ftable
>>
>> I'm curious about how you intend to use this new -list-features feature.
>> Are you enabling/disabling some UI element depending on presence of the
>> feature? I.e., something that you wouldn't be able to do by just
>> trying the "-data-disassemble -a" command and looking for error?
>
> Yes. Basically I have a menu item on frame that opens another window with
> disassembly of the coresponding function (showing current instruction,
> (basic) blocks and alike).
>
> For programs with debug information, I can do that even without -a option.
> For programs without debug information, I need -a option and - to make the
> frontend robust w.r.t UX - I disable the menu item.
>
> I can indeed just try and catch the error, but this seems to be too heavyweight.
> It would mean to disassemble function whenever user switches frames in the
> UI or in CLI. I can cache the result, but still. This new feature just makes
> it trivial and fast enough (no MI roundtrip to enable/disable menu item)
Ahah, thanks. (IMHO, that's useful info that include in a submission that
proposes a -list-features addition.)
>
> That being said, I do not insist on having this feature. I'm close to the point
> of just saying "you need to use my patched GDB, anyway. At least for "now" and
> hope that my patches will eventually make it into official GDB release. Not a big
> deal for me, not at all.
>
> So, if you (meaning you maintainers) prefer not having this feature, I'll just remove
> it. Absolutely no problem! Just let me know.
I was really just curious. And TBC, I was just talking about the -list-features
entry, not the actual whole "-a" feature added by the patch, which I agree is useful.
> --- a/gdb/NEWS
> +++ b/gdb/NEWS
> @@ -3,6 +3,9 @@
>
> *** Changes since GDB 8.1
>
> +* The '-data-disassemble' MI command now accepts the '-a' option to disassemble
> + the whole function surrounding given program counter value or function name.
This should be moved to the "since 8.2" section.
Thanks,
Pedro Alves
next prev parent reply other threads:[~2018-08-10 10:41 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-06 9:39 Jan Vrany
2018-07-06 12:37 ` Eli Zaretskii
2018-07-14 17:39 ` Jan Vrany
2018-07-14 18:27 ` Eli Zaretskii
2018-07-26 14:56 ` Jan Vrany
2018-07-26 17:47 ` Eli Zaretskii
2018-07-27 7:57 ` Jan Vrany
2018-07-30 15:05 ` Tom Tromey
2018-07-31 10:23 ` Jan Vrany
2018-07-31 15:48 ` Tom Tromey
2018-07-31 20:35 ` Jan Vrany
2018-08-09 20:47 ` Tom Tromey
2018-08-10 8:29 ` Jan Vrany
2018-08-10 13:22 ` Tom Tromey
2018-08-10 8:30 ` Jan Vrany
2018-08-10 9:47 ` Pedro Alves
2018-08-10 10:28 ` Jan Vrany
2018-08-10 10:41 ` Pedro Alves [this message]
2018-08-14 9:16 ` Jan Vrany
2018-08-14 13:57 ` Pedro Alves
2018-08-14 14:40 ` 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=71a83e5b-0662-e269-5b94-be7fc2ce5687@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.vrany@fit.cvut.cz \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox