From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 469 invoked by alias); 16 Jan 2006 20:59:19 -0000 Received: (qmail 460 invoked by uid 22791); 16 Jan 2006 20:59:18 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 16 Jan 2006 20:59:14 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k0GKwdfK015007; Mon, 16 Jan 2006 21:58:39 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id k0GKwd04023473; Mon, 16 Jan 2006 21:58:39 +0100 (CET) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id k0GKwdqv010416; Mon, 16 Jan 2006 21:58:39 +0100 (CET) Date: Mon, 16 Jan 2006 20:59:00 -0000 Message-Id: <200601162058.k0GKwdqv010416@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: drow@false.org CC: gdb-patches@sourceware.org In-reply-to: <20060116200238.GA11566@nevyn.them.org> (message from Daniel Jacobowitz on Mon, 16 Jan 2006 15:02:38 -0500) Subject: Re: RFC: target_create_inferior that does not call proceed References: <20060116200238.GA11566@nevyn.them.org> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-01/txt/msg00199.txt.bz2 > Date: Mon, 16 Jan 2006 15:02:38 -0500 > From: Daniel Jacobowitz > > 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