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: Michael Snyder <msnyder at redhat dot com>
- To: Andrew Cagney <cagney at gnu dot org>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Mon, 13 Sep 2004 18:44:24 +0000
- Subject: Re: [rfa] Assume thread-db loaded over a live process
- Organization: Red Hat, Inc.
- References: <4145A745.6090603@gnu.org>
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?