This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 10/12] Switch current_thread to lwp's thread in install_software_single_step_breakpoints
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Mon, 13 Jun 2016 16:25:55 +0100
- Subject: Re: [PATCH 10/12] Switch current_thread to lwp's thread in install_software_single_step_breakpoints
- Authentication-results: sourceware.org; auth=none
- References: <1464859846-15619-1-git-send-email-yao dot qi at linaro dot org> <1464859846-15619-11-git-send-email-yao dot qi at linaro dot org>
On 06/02/2016 10:30 AM, Yao Qi wrote:
> install_software_single_step_breakpoints has parameter lwp, but still
> need to switch to current_thread. In order to simplify its caller,
> we do the current_thread save/restore inside install_software_single_step_breakpoints.
>
> gdb/gdbserver:
>
> 2016-05-25 Yao Qi <yao.qi@linaro.org>
>
> * gdbthread.h (make_cleanup_restore_current_thread): Declare.
> * inferiors.c (do_restore_current_thread_cleanup): New function.
> (make_cleanup_restore_current_thread): Likewise.
> * linux-low.c (install_software_single_step_breakpoints): Call
> make_cleanup_restore_current_thread. Switch current_thread to
> thread.
OK.
Thanks,
Pedro Alves