From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4960 invoked by alias); 13 Sep 2004 21:51:45 -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 4937 invoked from network); 13 Sep 2004 21:51:44 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 13 Sep 2004 21:51:44 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i8DLphD9003721 for ; Mon, 13 Sep 2004 17:51:44 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i8DLpbr20790; Mon, 13 Sep 2004 17:51:37 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 6759928D2; Mon, 13 Sep 2004 17:49:24 -0400 (EDT) Message-ID: <414615E4.8030003@gnu.org> Date: Mon, 13 Sep 2004 21:51:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040831 MIME-Version: 1.0 To: Michael Snyder Cc: gdb-patches@sources.redhat.com Subject: Re: [rfa] Assume thread-db loaded over a live process References: <4145A745.6090603@gnu.org> <4145EA88.2050401@redhat.com> In-Reply-To: <4145EA88.2050401@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg00219.txt.bz2 > 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. >> >> ok? > > > From memory, I think this code was to guard against the corefile case. > When you load a corefile, you may call thread_db_new_objfile, but > you won't have a child process. Is that no longer the case? Does > loading a corefile no longer cause this function to be called? This code is only executed when there is a child process. As you note, when loading a core file there is no child process (and as daniel pointed out, !target_has_execution holds) so this code is not executed. Andrew