From: Simon Marchi <simon.marchi@polymtl.ca>
To: Jan Vrany <jan.vrany@fit.cvut.cz>
Cc: gdb@sourceware.org
Subject: Re: How to use -list-target-features MI command
Date: Mon, 23 Apr 2018 01:37:00 -0000 [thread overview]
Message-ID: <7d2d750c39c73c13c2d0e04667475d8f@polymtl.ca> (raw)
In-Reply-To: <efef6a2e4c1db94ef5e7a445af03413ae5bd19b3.camel@fit.cvut.cz>
Hi Jan,
On 2018-04-09 10:22, Jan Vrany wrote:
> Hi there,
>
> I need to know (in advance) whether the target supports async
> mode or not.
> I know that -list-target-features can be used for that, but
> not sure when and how to use -list-target-features.
>
> The documentation says:
>
> "Whenever a target can change, due to commands such as -target-select,
> -target-attach or -exec-run, the list of target features may change,
> and the frontend should obtain it again."
>
> However, once I issue `-exec-run` using a target with no async mode
> support, I will not get the result of -list-target-feature before
> debugee stops.
I think that's kind of expected. If the run target does not support
mi-async, GDB can't parse and reply to MI commands while the target is
executing. GDB reads and replies to your -list-target-features only
when the target stops.
One way to hack around it would be to use for example the new "starti"
command, which breaks at (before?) the first instruction of the program,
issue -list-target-features, and then continue. There might be some
better/cleaner solution, but that's what comes to mind right now.
> Another problem is that user may enter CLI command manually. In case,
> how do I find out that target may have changed and I should check for
> features?
I don't see a way right now that you could know about that. There would
need to be a new asynchronous event emitted when the target stack
changes.
Simon
next prev parent reply other threads:[~2018-04-23 1:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-09 14:22 Jan Vrany
2018-04-23 1:37 ` Simon Marchi [this message]
2018-04-24 10:20 ` Pedro Alves
2018-04-26 23:49 ` Jan Vrany
2018-04-27 18:44 ` Simon Marchi
2018-05-18 21:16 ` Jan Vrany
2018-05-27 22:13 ` Simon Marchi
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=7d2d750c39c73c13c2d0e04667475d8f@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=gdb@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