Re: [RFA] Inform about new thread in a single place.

Mark Kettenis
2007-12-14T18:49:11Z

> From: Vladimir Prus <vladimir@codesourcery.com>
> Date: Fri, 14 Dec 2007 20:09:08 +0300
>
> We have lots of place where "[New thread XXX]" is printed.
> This patch makes add_thread responsible for that. OK?

No, there are places in the code where add_thread() is called where we
should not print the "[New thread xxx]" message. For example in
bsd-uthread.c, where the main thread is added to the list of threads
to associate process ID and thread ID.

> Inform about new thread in a single place.
> * thread.c (add_thread): Announce new thread.
> * inf-ttrace.c (inf_ttrace_wait): Don't
> inform about new thread, as add_thread is always
> called too, and will take care of that.
> * infrun.c (handle_inferior_event): Likewise.
> * procfs.c (procfs_wait): Likewise.
> * remote.c (remote_currthread): Likewise.
> * sol-thread.c (sol_thread_wait): Likewise.
> * win32-nat.c (get_win32_debug_event): Likewise.
> * gdb/linux-nat.c (lin_lwp_attach_lwp): Likewise.
> * linux-thread-db.c (attach_thread): Don't inform
> about new thread. This is called only from
> linux-thread-db.c:attach_thread, which will take care.