diff options
author | Yao Qi <yao.qi@linaro.org> | 2015-07-17 14:06:34 +0100 |
---|---|---|
committer | Yao Qi <yao.qi@linaro.org> | 2015-07-17 14:07:18 +0100 |
commit | e53b69389a7d743fe888926475d46167e91b1157 (patch) | |
tree | 60f032baab8e4eb32b8b3ef4c101bd64239286e1 /gdb | |
parent | 4c0a9a6fa1c43e727e8de9ede87df7c21bd8500f (diff) | |
download | gdb-e53b69389a7d743fe888926475d46167e91b1157.zip gdb-e53b69389a7d743fe888926475d46167e91b1157.tar.gz gdb-e53b69389a7d743fe888926475d46167e91b1157.tar.bz2 |
Call ptid_get_pid instead of get_thread_id in aarch64_linux_get_debug_reg_capacity
aarch64_linux_get_debug_reg_capacity is called by
aarch64_linux_child_post_startup_inferior, and argument ptid is created in
inf-ptrace.c:inf_ptrace_create_inferior,
/* On some targets, there must be some explicit actions taken after
the inferior has been started up. */
target_post_startup_inferior (pid_to_ptid (pid));
so in aarch64_linux_get_debug_reg_capacity, we can get pid by ptid_get_pid,
and don't need to use get_thread_id.
gdb:
2015-07-17 Yao Qi <yao.qi@linaro.org>
* aarch64-linux-nat.c (aarch64_linux_get_debug_reg_capacity): Call
ptid_get_pid instead of get_thread_id.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/aarch64-linux-nat.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 646a827..6bf9d40 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,10 @@ 2015-07-17 Yao Qi <yao.qi@linaro.org> + * aarch64-linux-nat.c (aarch64_linux_get_debug_reg_capacity): Call + ptid_get_pid instead of get_thread_id. + +2015-07-17 Yao Qi <yao.qi@linaro.org> + * remote.c (get_current_thread): Initialise ptid to null_ptid. (add_current_inferior_and_thread): Don't initialise ptid. diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c index c4ddad5..628ffe8 100644 --- a/gdb/aarch64-linux-nat.c +++ b/gdb/aarch64-linux-nat.c @@ -848,7 +848,7 @@ aarch64_linux_get_debug_reg_capacity (ptid_t ptid) struct iovec iov; struct user_hwdebug_state dreg_state; - tid = get_thread_id (ptid); + tid = ptid_get_pid (ptid); iov.iov_base = &dreg_state; iov.iov_len = sizeof (dreg_state); |