Call ptid_get_pid instead of get_thread_id in aarch64_linux_get_debug_reg_capacity
authorYao Qi <yao.qi@linaro.org>
Fri, 17 Jul 2015 13:06:34 +0000 (14:06 +0100)
committerYao Qi <yao.qi@linaro.org>
Fri, 17 Jul 2015 13:07:18 +0000 (14:07 +0100)
commite53b69389a7d743fe888926475d46167e91b1157
tree60f032baab8e4eb32b8b3ef4c101bd64239286e1
parent4c0a9a6fa1c43e727e8de9ede87df7c21bd8500f
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.
gdb/ChangeLog
gdb/aarch64-linux-nat.c