This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: don't call add_target for thread_db_ops
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 03 Jul 2013 09:46:03 +0100
- Subject: Re: RFC: don't call add_target for thread_db_ops
- References: <1372783053-14925-1-git-send-email-tromey at redhat dot com>
On 07/02/2013 05:37 PM, Tom Tromey wrote:
> * linux-thread-db.c (init_thread_db_ops): Call
> complete_target_initialization.
> (_initialize_thread_db): Don't call add_target.
> * target.c (complete_target_initialization): New function.
> (add_target_with_completer): Call it.
> * target.h (complete_target_initialization): Declare.
This is OK.
Really all the thread_stratum targets should be likewise adjusted:
$ grep "to_stratum.*thread_stratum;" * -l | xargs grep add_target
aix-thread.c: add_target (&aix_thread_ops);
bsd-uthread.c: add_target (bsd_uthread_target ());
dec-thread.c: add_target (&dec_thread_ops);
linux-thread-db.c: add_target (&thread_db_ops);
ravenscar-thread.c: add_target (&ravenscar_ops);
sol-thread.c: add_target (&sol_thread_ops);
--
Pedro Alves