From: Daniel Jacobowitz <drow@false.org>
To: Pedro Alves <pedro@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: attach& support, and attach "async + sync_execution" support.
Date: Mon, 17 Mar 2008 16:18:00 -0000 [thread overview]
Message-ID: <20080317161758.GA13212@caradoc.them.org> (raw)
In-Reply-To: <200803171548.09531.pedro@codesourcery.com>
On Mon, Mar 17, 2008 at 03:48:09PM +0000, Pedro Alves wrote:
> A Friday 14 March 2008 19:18:21, Daniel Jacobowitz wrote:
> > Could you do some refactoring on this, please? It duplicates code
> > from attach_command. When I fixed up step last year I moved the
> > common code into its own function. Makes it much easier to see
> > the differences between async and sync operation. And for instance
> > it lets me see that you're calling deprecated_attach_hook twice
> > in async mode :-)
>
> I don't think I was :-) There were three different exit points.
> sync, async/sync_execution, and true async.
Yep, you're correct. OK, it lets me confuse myself.
> (P.S. Am I the only one that thinks that continuation
> arguments suck? IMHO, we should move the continuation_arg data
> union into the continuation proper, and force people to use
> structs for the compound args. Oh, and who is responsible for
> freeing the continuation args? Nobody seems to be doing that.)
Yes, this is a mess. Maybe we should go back to just passing a void
*...
> + if (args)
> + {
> + async_exec = strip_bg_char (&args);
> +
> + /* If we get a request for running in the bg but the target
> + doesn't support it, error out. */
> + if (async_exec && !target_can_async_p ())
> + error (_("Asynchronous execution not supported on this target."));
> +
> + /* If we don't get a request of running in the bg, then we need
> + to simulate synchronous (fg) execution. */
> + if (!async_exec && target_can_async_p ())
> + {
> + /* Simulate synchronous execution */
> + async_disable_stdin ();
> + }
> + }
This logic will work, since args should never be NULL anyway, but the
call to async_disable_stdin is not dependent on args I think?
Otherwise OK.
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2008-03-17 16:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-14 8:05 Pedro Alves
2008-03-14 19:18 ` Daniel Jacobowitz
2008-03-15 16:22 ` Vladimir Prus
2008-03-17 15:48 ` Pedro Alves
2008-03-17 16:18 ` Daniel Jacobowitz [this message]
2008-03-17 17:35 ` Pedro Alves
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=20080317161758.GA13212@caradoc.them.org \
--to=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.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