From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27456 invoked by alias); 13 Sep 2004 14:27:05 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 27430 invoked from network); 13 Sep 2004 14:27:03 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 13 Sep 2004 14:27:03 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1C6rnK-00012p-PL; Mon, 13 Sep 2004 10:27:02 -0400 Date: Mon, 13 Sep 2004 14:27:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa] Assume thread-db loaded over a live process Message-ID: <20040913142702.GA3809@nevyn.them.org> Mail-Followup-To: Andrew Cagney , gdb-patches@sources.redhat.com References: <4145A745.6090603@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4145A745.6090603@gnu.org> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-09/txt/msg00205.txt.bz2 On Mon, Sep 13, 2004 at 09:57:25AM -0400, Andrew Cagney wrote: > Hello, > > This patch changes: > > - /* We can only poke around if there actually is a child process. > - If there is no child process alive, postpone the steps below > - until one has been created. */ > - if (proc_handle.pid != 0) > - { > - enable_thread_event_reporting (); > - thread_db_find_new_threads (); > - } > + enable_thread_event_reporting (); > + thread_db_find_new_threads (); > > this code is only executed when there is a child process so the guard > isn't needed. Tested on GNU/Linux, no change in test results. Historical note: this code is older than the !target_has_execution check above. It used to be reachable, and was for the static executable case. Seems a reasonable change to me. -- Daniel Jacobowitz