Add constructor and destructor to thread_info
authorYao Qi <yao.qi@linaro.org>
Wed, 29 Mar 2017 15:56:31 +0000 (16:56 +0100)
committerYao Qi <yao.qi@linaro.org>
Wed, 29 Mar 2017 15:56:31 +0000 (16:56 +0100)
commit1231656410996d2cc271486adc743a0fafe2ab4d
tree911ae8b65ae5aa44079ce9cf4e979d6fdd4189fe
parent52be03fd13a26ecda4f27c451a434f19eded0ca6
Add constructor and destructor to thread_info

This patch adds constructor and destructor to thread_info.

gdb:

2017-03-29  Yao Qi  <yao.qi@linaro.org>

* gdbthread.h (struct thread_info): Declare constructor and
destructor.  Add some in-class member initializers.
* thread.c (free_thread): Remove.
(init_thread_list): Call delete instead of free_thread.
(new_thread): Call thread_info constructor.
(thread_info::thread_info): New function.
(thread_info::~thread_info): New function.
(delete_thread_1): Call delete instead of free_thread.
(make_cleanup_restore_current_thread): Move tp and frame to
inner block.
gdb/ChangeLog
gdb/gdbthread.h
gdb/thread.c