From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26713 invoked by alias); 8 Aug 2006 16:01:25 -0000 Received: (qmail 26701 invoked by uid 22791); 8 Aug 2006 16:01:23 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 08 Aug 2006 16:01:19 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1GAU13-0005kF-Ok; Tue, 08 Aug 2006 12:01:14 -0400 Date: Tue, 08 Aug 2006 16:01:00 -0000 From: Daniel Jacobowitz To: Jan Kratochvil Cc: Mark Kettenis , gdb-patches@sourceware.org Subject: Re: [patch] Linux MAY_FOLLOW_EXEC #2 Message-ID: <20060808160113.GC21032@nevyn.them.org> Mail-Followup-To: Jan Kratochvil , Mark Kettenis , gdb-patches@sourceware.org References: <20060614105510.GA12067@host0.dyn.jankratochvil.net> <20060614142552.GA15021@nevyn.them.org> <20060615203519.GA9603@host0.dyn.jankratochvil.net> <20060721181556.GA9150@lace.redhat.com> <20060721184421.GA22820@nevyn.them.org> <20060722123102.GA1936@lace.redhat.com> <20060724190332.GA13612@nevyn.them.org> <20060729185317.GA16200@host0.dyn.jankratochvil.net> <200607312038.k6VKchKj018729@elgar.sibelius.xs4all.nl> <20060805164144.GA23819@host0.dyn.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060805164144.GA23819@host0.dyn.jankratochvil.net> User-Agent: Mutt/1.5.11+cvs20060403 X-IsSubscribed: yes 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-08/txt/msg00043.txt.bz2 On Sat, Aug 05, 2006 at 06:41:44PM +0200, Jan Kratochvil wrote: > Hi Mark, > > On Mon, 31 Jul 2006 22:38:43 +0200, Mark Kettenis wrote: > ... > > That WNOHANG is wrong; > > In fact yes, the patch is more correct without that WNOHANG hack there. > > > 2006-07-29 Jan Kratochvil > > * inf-ptrace.c (inf_ptrace_mourn_inferior): waitpid(2) only if there > is valid inferior_ptid to wait for. > * linux-fork.c (linux_fork_mourn_inferior): Ditto. > * infrun.c (follow_exec): Unconditionally enabled by MAY_FOLLOW_EXEC. > Provide restoration of exec_bfd and symfile_objfile for any new "run". > * linux-thread-db.c (thread_db_wait): Handle TARGET_WAITKIND_EXECD. > * linux-thread-db.c (thread_db_mourn_inferior): Turn off threading. > * foll-exec.exp: Uncoditionally enabled for all platforms. > Relaxed regex to apply besides HP-UX also for GNU/Linux backtrace. Sorry, but I can't approve this patch. I think someone needs to discuss the concept and interface on gdb@ first. You're using make_run_cleanup to restore the inferior file. This means it happens before "run". Any time we choose to change the file silently will be surprising (especially to front ends like Eclipse) but that time will be pretty surprising to the user too: ... info files shows first prog (gdb) catch exec (gdb) run ... info files shows second prog (gdb) continue ... exits. ... info files shows second prog (gdb) run ... starts first prog! I also think that changing inferior_ptid before mourning is pretty strange. The whole way follow_exec works is a hack and not particularly well defined. This is a hard problem to solve; I think a half-finished solution would be worse than leaving it unsolved. -- Daniel Jacobowitz CodeSourcery