From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12171 invoked by alias); 10 Nov 2007 16:00:59 -0000 Received: (qmail 12161 invoked by uid 22791); 10 Nov 2007 16:00:58 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 10 Nov 2007 16:00:55 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 7596B98353 for ; Sat, 10 Nov 2007 16:00:53 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 5B06D98347 for ; Sat, 10 Nov 2007 16:00:53 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1IqslQ-0006mt-OG for gdb@sourceware.org; Sat, 10 Nov 2007 11:00:52 -0500 Date: Sat, 10 Nov 2007 16:00:00 -0000 From: Daniel Jacobowitz To: gdb@sourceware.org Subject: Re: linux-thread-db.c not only caller of add_thread, -> gdb segv Message-ID: <20071110160052.GA25807@caradoc.them.org> Mail-Followup-To: gdb@sourceware.org References: <20071109140225.GA32113@caradoc.them.org> <20071110032558.GA19831@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-11/txt/msg00081.txt.bz2 On Fri, Nov 09, 2007 at 09:20:25PM -0800, Douglas Evans wrote: > On Nov 9, 2007 7:40 PM, Douglas Evans wrote: > > I suspect it's a matter of degrees (so to speak) or word choice (apologies). > > Until MAY_FOLLOW_EXEC is true for linux I'd expect gdb to return control > > to the user when an exec() happens. > > Am I wrong in thinking gdb will lose control across the exec()? > > I guess what gdb does for an exec() when MAY_FOLLOW_EXEC==0 is at > least partially a matter of taste or definition. Running some > experiments I can see that I can control (e.g. single step) the "new" > process after the exec but the symbol info is all wrong if I exec() a > different program. Right. Thus the patch I mentioned (sorry, should have found the link yesterday): http://sourceware.org/ml/gdb-patches/2007-10/msg00455.html > With this patch I can step across the exec from test-exec1.c to test-exec2.c. > IWBN if gdb remembered the original program so that if I run it again, > gdb reruns test-exec1.x and not test-exec2.x. Yeah. I haven't figured out what to do about that, or all the various implications... for instance, if you say "file" should that override the program to run the next time? So I've just fixed it as it was and not messed with the dubious UI. There may be more to come on this topic... -- Daniel Jacobowitz CodeSourcery