From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26508 invoked by alias); 14 Sep 2004 00:42:46 -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 26501 invoked from network); 14 Sep 2004 00:42:45 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 14 Sep 2004 00:42:45 -0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx1.redhat.com (8.12.11/8.12.10) with ESMTP id i8E0gdtc008189 for ; Mon, 13 Sep 2004 20:42:45 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i8E0gc726113; Mon, 13 Sep 2004 20:42:38 -0400 Received: from redhat.com (dhcp-172-16-25-160.sfbay.redhat.com [172.16.25.160]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id i8E0gSV28929; Mon, 13 Sep 2004 17:42:28 -0700 Message-ID: <41463E73.7060703@redhat.com> Date: Tue, 14 Sep 2004 00:42:00 -0000 From: Michael Snyder Organization: Red Hat, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4.2) Gecko/20040301 MIME-Version: 1.0 To: Daniel Jacobowitz CC: Andrew Cagney , 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> <414615E4.8030003@gnu.org> <4146247B.20600@redhat.com> <20040913225913.GA27645@nevyn.them.org> In-Reply-To: <20040913225913.GA27645@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-09/txt/msg00222.txt.bz2 Daniel Jacobowitz wrote: > On Mon, Sep 13, 2004 at 10:51:39PM +0000, Michael Snyder wrote: > >>Andrew Cagney wrote: >> >>>>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. >> >>That's what I don't understand, Andrew. This code *used to* get >>called for a corefile. What's changed? As far as I can see, >>it will get called from symbol_file_add. In my existing July >>build, it does. > > > Um, is that July of _this_ year? There's a !target_has_execution check > up above it. Ah. OK. I only checked to see if the function was called. Now I see that this code doesn't get reached. OK, sorry for the confusion -- the change looks fine to me.