[rfa] Assume thread-db loaded over a live process

Daniel Jacobowitz drow@false.org
Mon Sep 13 14:27:00 GMT 2004


On Mon, Sep 13, 2004 at 09:57:25AM -0400, 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.

Historical note: this code is older than the !target_has_execution
check above.  It used to be reachable, and was for the static
executable case.

Seems a reasonable change to me.

-- 
Daniel Jacobowitz



More information about the Gdb-patches mailing list