This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v3 4/6] Use LWP IDs with ptrace register requests on FreeBSD.
- From: Pedro Alves <palves at redhat dot com>
- To: John Baldwin <jhb at FreeBSD dot org>, gdb-patches at sourceware dot org, binutils at sourceware dot org
- Date: Mon, 18 Jan 2016 12:32:05 +0000
- Subject: Re: [PATCH v3 4/6] Use LWP IDs with ptrace register requests on FreeBSD.
- Authentication-results: sourceware.org; auth=none
- References: <1453084047-16175-1-git-send-email-jhb at FreeBSD dot org> <1453084047-16175-5-git-send-email-jhb at FreeBSD dot org>
On 01/18/2016 02:27 AM, John Baldwin wrote:
> This allows gdb to fetch per-thread registers for multi-threaded FreeBSD
> processes.
>
> Export get_ptrace_pid() from inf-ptrace.c and use it to determine the PID
> to pass to ptrace in pan-BSD native targets. NetBSD and OpenBSD also accept
> LWP IDs for ptrace requests to fetch per-thread state.
>
> gdb/ChangeLog:
>
> * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
> get_ptrace_pid.
> (amd64bsd_store_inferior_registers): Use get_ptrace_pid.
> (amd64bsd_dr_get): Use get_ptrace_pid.
> (amd64bsd_dr_set): Use get_ptrace_pid.
> * i386bsd-nat.c (i386bsd_fetch_inferior_registers): Use get_ptrace_pid.
> (i386bsd_store_inferior_registers): Use get_ptrace_pid.
> (i386bsd_dr_get): Use get_ptrace_pid.
> (i386bsd_dr_set): Use get_ptrace_pid.
> * inf-ptrace.c (get_ptrace_pid): Export.
> * inf-ptrace.h (get_ptrace_pid): Declare.
> * ppcfbsd-nat.c (ppcfbsd_fetch_inferior_registers): Use lwp id.
> (ppcfbsd_store_inferior_registers): Use lwp id.
LGTM.
Thanks,
Pedro Alves