This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: target_create_inferior that does not call proceed
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: drow at false dot org
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 16 Jan 2006 21:58:39 +0100 (CET)
- Subject: Re: RFC: target_create_inferior that does not call proceed
- References: <20060116200238.GA11566@nevyn.them.org>
> Date: Mon, 16 Jan 2006 15:02:38 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> You'll notice that the call to observer_notify_inferior_created
> is removed from several target methods, and moved to the end of
> run_command_1. Consequently it's no longer possible to accidentally forget
> about a target - as we've obviously done for most of the targets I changed
> here. Less duplication is good!
Yay!
> I'll be needing to run some additional common code fragments between
> creating an inferior and starting it, for an upcoming project. Like most of
> GDB they need the target to be stopped; that's why I separated the create
> and proceed phases here.
That's the reason why you created post_create_inferior? If yes, then,
that answers the next question: Why did you introduce post_create_inferior?
> Another benefit of this is that I could finally implement a command I've
> wanted for ages when debugging startup code: create the inferior but don't
> run it, and give me my prompt back. That's not in this patch only because I
> couldn't think of a name for it! I'd call it "start", but well... already
> in use. Would anyone else find this useful? If so, would you care to
> suggest a name?
I vaguely remember there was a way to do that already, but when I last
wanted to use it, I couldn't find a way to do it. So yes, I'd welcome
such a command. Perhaps we could have something like:
(gdb) set stop-on-entry 1
after which "run" or "start" would stop at the entry point?
Mark