This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
RE: [rfa] Assume thread-db loaded over a live process
- From: "Howell, David P" <david dot p dot howell at intel dot com>
- To: "Michael Snyder" <msnyder at redhat dot com>, "Andrew Cagney" <cagney at gnu dot org>
- Cc: <gdb-patches at sources dot redhat dot com>
- Date: Mon, 13 Sep 2004 12:26:27 -0700
- Subject: RE: [rfa] Assume thread-db loaded over a live process
As I recall from 5.3 this was necessary due to libthread_db
using the /proc access libraries to get info from the inferior;
it would require an alternate implementation for similar core
file access, it wasn't there then and so the guard was necessary.
It would be nice if this were fixed.
Thanks,
Dave Howell
These are my opinions and not official opinions of Intel Corp.
David Howell
Intel Corporation
Telco Server Development
Server Products Division
Voice: (803) 216-2359 Fax: (803) 216-2178
Intel Corporation
Columbia Design Center, CBA-1
100 Center Point Circle, Suite 210
Columbia, SC 29210
david.p.howell@intel.com
-----Original Message-----
From: gdb-patches-owner@sources.redhat.com
[mailto:gdb-patches-owner@sources.redhat.com] On Behalf Of Michael
Snyder
Sent: Monday, September 13, 2004 2:44 PM
To: Andrew Cagney
Cc: gdb-patches@sources.redhat.com
Subject: Re: [rfa] Assume thread-db loaded over a live process
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?