diff options
author | Yao Qi <yao.qi@linaro.org> | 2015-08-25 11:38:29 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2015-08-25 11:39:14 +0100 |
commit | db3cb7cb3e51e5eb834412adbf90e81bb76846c6 (patch) | |
tree | 7523d968e5775db256e5ccf76ee193fbe48c40bf /gdb/aarch64-linux-nat.c | |
parent | f6011a1c84b1bd616617bfde84dca63f250c950d (diff) | |
download | gdb-db3cb7cb3e51e5eb834412adbf90e81bb76846c6.zip gdb-db3cb7cb3e51e5eb834412adbf90e81bb76846c6.tar.gz gdb-db3cb7cb3e51e5eb834412adbf90e81bb76846c6.tar.bz2 |
Move aarch64_linux_prepare_to_resume to nat/aarch64-linux.c
gdb:
2015-08-25 Yao Qi <yao.qi@linaro.org>
* Makefile.in (aarch64-liunx.o): New rule.
(HFILES_NO_SRCDIR): Add aarch64-linux.h.
* config/aarch64/linux.mh (NAT_FILE): Add aarch64-linux.o.
* aarch64-linux-nat.c: Include nat/aarch64-linux.h.
* aarch64-linux-nat.c (aarch64_get_debug_reg_state): Make it
extern.
(aarch64_linux_prepare_to_resume): Move it nat/aarch64-linux.c.
* nat/aarch64-linux-hw-point.h (aarch64_debug_reg_state): Declare
* nat/aarch64-linux.c: New file.
* nat/aarch64-linux.h: New file.
gdb/gdbserver:
2015-08-25 Yao Qi <yao.qi@linaro.org>
* Makefile.in (aarch64-linux.o): New rule.
* configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
srv_tgtobj.
* linux-aarch64-low.c: Include nat/aarch64-linux.h.
(aarch64_init_debug_reg_state): Make it extern.
(aarch64_linux_prepare_to_resume): Remove.
Diffstat (limited to 'gdb/aarch64-linux-nat.c')
-rw-r--r-- | gdb/aarch64-linux-nat.c | 44 |
1 files changed, 2 insertions, 42 deletions
diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c index b23026a..ea56238 100644 --- a/gdb/aarch64-linux-nat.c +++ b/gdb/aarch64-linux-nat.c @@ -30,6 +30,7 @@ #include "aarch64-tdep.h" #include "aarch64-linux-tdep.h" #include "aarch32-linux-nat.h" +#include "nat/aarch64-linux.h" #include "nat/aarch64-linux-hw-point.h" #include "elf/external.h" @@ -141,7 +142,7 @@ aarch64_forget_process (pid_t pid) /* Get debug registers state for process PID. */ -static struct aarch64_debug_reg_state * +struct aarch64_debug_reg_state * aarch64_get_debug_reg_state (pid_t pid) { return &aarch64_process_info_get (pid)->state; @@ -425,47 +426,6 @@ supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp) AARCH64_LINUX_SIZEOF_FPREGSET); } -/* Called when resuming a thread. - The hardware debug registers are updated when there is any change. */ - -static void -aarch64_linux_prepare_to_resume (struct lwp_info *lwp) -{ - struct arch_lwp_info *info = lwp_arch_private_info (lwp); - - /* NULL means this is the main thread still going through the shell, - or, no watchpoint has been set yet. In that case, there's - nothing to do. */ - if (info == NULL) - return; - - if (DR_HAS_CHANGED (info->dr_changed_bp) - || DR_HAS_CHANGED (info->dr_changed_wp)) - { - ptid_t ptid = ptid_of_lwp (lwp); - int tid = ptid_get_lwp (ptid); - struct aarch64_debug_reg_state *state - = aarch64_get_debug_reg_state (ptid_get_pid (ptid)); - - if (show_debug_regs) - fprintf_unfiltered (gdb_stdlog, "prepare_to_resume thread %d\n", tid); - - /* Watchpoints. */ - if (DR_HAS_CHANGED (info->dr_changed_wp)) - { - aarch64_linux_set_debug_regs (state, tid, 1); - DR_CLEAR_CHANGED (info->dr_changed_wp); - } - - /* Breakpoints. */ - if (DR_HAS_CHANGED (info->dr_changed_bp)) - { - aarch64_linux_set_debug_regs (state, tid, 0); - DR_CLEAR_CHANGED (info->dr_changed_bp); - } - } -} - static void aarch64_linux_new_thread (struct lwp_info *lp) { |