RFC: don't call add_target for thread_db_ops
Pedro Alves
palves@redhat.com
Wed Jul 3 08:46:00 GMT 2013
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
More information about the Gdb-patches
mailing list