From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29816 invoked by alias); 22 Oct 2007 11:43:36 -0000 Received: (qmail 29808 invoked by uid 22791); 22 Oct 2007 11:43:35 -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; Mon, 22 Oct 2007 11:43:31 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id B581F9833E; Mon, 22 Oct 2007 11:43:29 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 9C7FE9833D; Mon, 22 Oct 2007 11:43:29 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1Ijvgu-0000SJ-OT; Mon, 22 Oct 2007 07:43:28 -0400 Date: Mon, 22 Oct 2007 12:09:00 -0000 From: Daniel Jacobowitz To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Support exec tracing on GNU/Linux and HP-UX Message-ID: <20071022114328.GA1421@caradoc.them.org> Mail-Followup-To: Joel Brobecker , gdb-patches@sourceware.org References: <20071019175920.GA548@caradoc.them.org> <20071022043831.GD764@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071022043831.GD764@adacore.com> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00500.txt.bz2 On Sun, Oct 21, 2007 at 09:38:31PM -0700, Joel Brobecker wrote: > I have tested this patch, and it unfortunately creates some issues: > > (gdb) run > Starting program: /[...]/p > Executing new program: /usr/local/bin/zsh > (no debugging symbols found) > Unable to find __dld_flags symbol in object file. > > What seems to happen is that we're enabling exec-following during > the startup sequence, and that causes us to do the follow-exec routine > on it. Eventually, this fails because the shell binary that I use > apparently does not have any symbols, thus causing the solib-som hook > to error out. > > Do we do the same on Linux? (exec-follow during the startup) No, we don't. We don't turn on the exec tracing option until linux_child_post_startup_inferior, and by then the shell has already execed. But inf-ttrace.c turns on exec tracing in inf_ttrace_him instead. This must be related to the code in infrun.c:1454 and its comment about how HP-UX is probably broken. It's not quite the same though since inferior_ignoring_leading_exec_events is supposed to handle execs which are reported twice. -- Daniel Jacobowitz CodeSourcery