Introduce current_lwp_ptid
This commit introduces a new function, current_lwp_ptid, that shared Linux code can use to obtain the ptid of the current lightweight process. gdb/ChangeLog: * nat/linux-nat.h (current_lwp_ptid): New declaration. * linux-nat.c (current_lwp_ptid): New function. * x86-linux-nat.c: Include nat/linux-nat.h. (x86_linux_dr_get_addr): Use current_lwp_ptid. (x86_linux_dr_get_control): Likewise. (x86_linux_dr_get_status): Likewise. (x86_linux_dr_set_control): Likewise. (x86_linux_dr_set_addr): Likewise. gdb/gdbserver/ChangeLog: * linux-low.c (current_lwp_ptid): New function. * linux-x86-low.c: Include nat/linux-nat.h. (x86_dr_low_get_addr): Use current_lwp_ptid. (x86_dr_low_get_control): Likewise. (x86_dr_low_get_status): Likewise.
This commit is contained in:
parent
1563054901
commit
7b6690874f
7 changed files with 53 additions and 14 deletions
|
@ -6218,6 +6218,14 @@ linux_low_btrace_conf (const struct btrace_target_info *tinfo,
|
|||
}
|
||||
#endif /* HAVE_LINUX_BTRACE */
|
||||
|
||||
/* See nat/linux-nat.h. */
|
||||
|
||||
ptid_t
|
||||
current_lwp_ptid (void)
|
||||
{
|
||||
return ptid_of (current_thread);
|
||||
}
|
||||
|
||||
static struct target_ops linux_target_ops = {
|
||||
linux_create_inferior,
|
||||
linux_attach,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue