Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Simon Marchi <simon.marchi@ericsson.com>, gdb-patches@sourceware.org
Subject: Re: [PATCH] mi_async_p: Use the default run target (PR gdb/18077)
Date: Wed, 04 Mar 2015 19:45:00 -0000	[thread overview]
Message-ID: <54F760DA.5050909@redhat.com> (raw)
In-Reply-To: <54F75E7A.9060308@ericsson.com>

On 03/04/2015 07:35 PM, Simon Marchi wrote:

> There is still the following paragraph that looks like it was split or
> something:
> 
>> Note that the "mi_async && target_can_async_p()" checks intend to
>> mimic GDB's behavior before target-async was the default.  In order
>> gdb's, if you did "set target-async on" and then
>> -exec-run/continue/step/whatever, gdb would just ignore the target-async
>> request.  This is actually documented:
> 
> I think I get the gist of it, but I am asking just in case.

Sorry about that.  I was interrupted midway writing that email,
and looks like I didn't glue things the best I could...  Let
me expand.

Here what I was thinking was, it might look like that the fix
should just be to make run_one_inferior pass the mi_async
variable directly, like:

 -    mi_execute_cli_command (run_cmd, mi_async_p (),
 +    mi_execute_cli_command (run_cmd, mi_async,
			      mi_async_p () ? "&" : NULL);

But, that would make "set mi-async on; -exec-run" with a target
that can't do async error out with "Asynchronous execution not
supported on this target", which is not how MI is documented to behave.
The "mi_async && target_can_async_p()" checks inside mi_async_p(), and
its use here mimic older GDBs behavior before target-async
was the default.  IOW, in older gdb's, if you did "set target-async on"
and then -exec-run/continue/step/whatever with a non-async target,
gdb would just ignore the target-async request and do a
synchronous run.

Let me know whether it's better now.  :-)

Thanks,
Pedro Alves


      reply	other threads:[~2015-03-04 19:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03 21:45 Simon Marchi
2015-03-04 10:18 ` Pedro Alves
2015-03-04 19:29   ` Simon Marchi
2015-03-04 19:32     ` Pedro Alves
2015-03-04 19:35       ` Simon Marchi
2015-03-04 19:45         ` Pedro Alves [this message]

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=54F760DA.5050909@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@ericsson.com \
    /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