From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31623 invoked by alias); 13 Sep 2004 13:59:51 -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 31614 invoked from network); 13 Sep 2004 13:59:50 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 13 Sep 2004 13:59:50 -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 i8DDxoK5023236 for ; Mon, 13 Sep 2004 09:59:50 -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 i8DDxdr05851; Mon, 13 Sep 2004 09:59:44 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 9AEED28D2; Mon, 13 Sep 2004 09:57:25 -0400 (EDT) Message-ID: <4145A745.6090603@gnu.org> Date: Mon, 13 Sep 2004 13:59: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: gdb-patches@sources.redhat.com Subject: [rfa] Assume thread-db loaded over a live process Content-Type: multipart/mixed; boundary="------------080104030807080502070407" X-SW-Source: 2004-09/txt/msg00204.txt.bz2 This is a multi-part message in MIME format. --------------080104030807080502070407 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 580 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? Andrew --------------080104030807080502070407 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 935 2004-09-11 Andrew Cagney * thread-db.c (thread_db_new_objfile): Assume that there is a child process. Index: thread-db.c =================================================================== RCS file: /cvs/src/src/gdb/thread-db.c,v retrieving revision 1.44 diff -p -u -r1.44 thread-db.c --- thread-db.c 8 Sep 2004 19:44:22 -0000 1.44 +++ thread-db.c 13 Sep 2004 13:51:23 -0000 @@ -697,14 +697,8 @@ thread_db_new_objfile (struct objfile *o push_target (&thread_db_ops); using_thread_db = 1; - /* 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 (); break; default: --------------080104030807080502070407--