mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-15 20:05:46 +08:00
Make aarch64_linux_prepare_to_resume the same on GDB and GDBserver
gdb: 2015-08-25 Yao Qi <yao.qi@linaro.org> * aarch64-linux-nat.c (aarch64_linux_prepare_to_resume): Use lwp_arch_private_info and ptid_of_lwp. gdb/gdbserver: 2015-08-25 Yao Qi <yao.qi@linaro.org> * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use lwp_arch_private_info and ptid_of_lwp.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2015-08-25 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
|
* aarch64-linux-nat.c (aarch64_linux_prepare_to_resume): Use
|
||||||
|
lwp_arch_private_info and ptid_of_lwp.
|
||||||
|
|
||||||
2015-08-25 Yao Qi <yao.qi@linaro.org>
|
2015-08-25 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
* aarch64-linux-nat.c (struct arch64_dr_update_callback_param):
|
* aarch64-linux-nat.c (struct arch64_dr_update_callback_param):
|
||||||
|
@ -431,7 +431,7 @@ supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
|
|||||||
static void
|
static void
|
||||||
aarch64_linux_prepare_to_resume (struct lwp_info *lwp)
|
aarch64_linux_prepare_to_resume (struct lwp_info *lwp)
|
||||||
{
|
{
|
||||||
struct arch_lwp_info *info = lwp->arch_private;
|
struct arch_lwp_info *info = lwp_arch_private_info (lwp);
|
||||||
|
|
||||||
/* NULL means this is the main thread still going through the shell,
|
/* NULL means this is the main thread still going through the shell,
|
||||||
or, no watchpoint has been set yet. In that case, there's
|
or, no watchpoint has been set yet. In that case, there's
|
||||||
@ -442,9 +442,10 @@ aarch64_linux_prepare_to_resume (struct lwp_info *lwp)
|
|||||||
if (DR_HAS_CHANGED (info->dr_changed_bp)
|
if (DR_HAS_CHANGED (info->dr_changed_bp)
|
||||||
|| DR_HAS_CHANGED (info->dr_changed_wp))
|
|| DR_HAS_CHANGED (info->dr_changed_wp))
|
||||||
{
|
{
|
||||||
int tid = ptid_get_lwp (lwp->ptid);
|
ptid_t ptid = ptid_of_lwp (lwp);
|
||||||
|
int tid = ptid_get_lwp (ptid);
|
||||||
struct aarch64_debug_reg_state *state
|
struct aarch64_debug_reg_state *state
|
||||||
= aarch64_get_debug_reg_state (ptid_get_pid (lwp->ptid));
|
= aarch64_get_debug_reg_state (ptid_get_pid (ptid));
|
||||||
|
|
||||||
if (show_debug_regs)
|
if (show_debug_regs)
|
||||||
fprintf_unfiltered (gdb_stdlog, "prepare_to_resume thread %d\n", tid);
|
fprintf_unfiltered (gdb_stdlog, "prepare_to_resume thread %d\n", tid);
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2015-08-25 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
|
* linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
|
||||||
|
lwp_arch_private_info and ptid_of_lwp.
|
||||||
|
|
||||||
2015-08-25 Yao Qi <yao.qi@linaro.org>
|
2015-08-25 Yao Qi <yao.qi@linaro.org>
|
||||||
|
|
||||||
* linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
|
* linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
|
||||||
|
@ -489,20 +489,18 @@ aarch64_linux_new_fork (struct process_info *parent,
|
|||||||
static void
|
static void
|
||||||
aarch64_linux_prepare_to_resume (struct lwp_info *lwp)
|
aarch64_linux_prepare_to_resume (struct lwp_info *lwp)
|
||||||
{
|
{
|
||||||
struct thread_info *thread = get_lwp_thread (lwp);
|
struct arch_lwp_info *info = lwp_arch_private_info (lwp);
|
||||||
ptid_t ptid = ptid_of (thread);
|
|
||||||
struct arch_lwp_info *info = lwp->arch_private;
|
|
||||||
|
|
||||||
if (DR_HAS_CHANGED (info->dr_changed_bp)
|
if (DR_HAS_CHANGED (info->dr_changed_bp)
|
||||||
|| DR_HAS_CHANGED (info->dr_changed_wp))
|
|| DR_HAS_CHANGED (info->dr_changed_wp))
|
||||||
{
|
{
|
||||||
|
ptid_t ptid = ptid_of_lwp (lwp);
|
||||||
int tid = ptid_get_lwp (ptid);
|
int tid = ptid_get_lwp (ptid);
|
||||||
struct process_info *proc = find_process_pid (ptid_get_pid (ptid));
|
|
||||||
struct aarch64_debug_reg_state *state
|
struct aarch64_debug_reg_state *state
|
||||||
= &proc->priv->arch_private->debug_reg_state;
|
= aarch64_get_debug_reg_state (ptid_get_pid (ptid));
|
||||||
|
|
||||||
if (show_debug_regs)
|
if (show_debug_regs)
|
||||||
fprintf (stderr, "prepare_to_resume thread %ld\n", lwpid_of (thread));
|
fprintf (stderr, "prepare_to_resume thread %d\n", tid);
|
||||||
|
|
||||||
/* Watchpoints. */
|
/* Watchpoints. */
|
||||||
if (DR_HAS_CHANGED (info->dr_changed_wp))
|
if (DR_HAS_CHANGED (info->dr_changed_wp))
|
||||||
|
Reference in New Issue
Block a user