This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v2 4/6] Use LWP IDs with ptrace register requests on FreeBSD.
- From: John Baldwin <jhb at freebsd dot org>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Fri, 15 Jan 2016 15:22:34 -0800
- Subject: Re: [PATCH v2 4/6] Use LWP IDs with ptrace register requests on FreeBSD.
- Authentication-results: sourceware.org; auth=none
- References: <1452721551-657-1-git-send-email-jhb at FreeBSD dot org> <6071650 dot bM8jrAlx9r at ralph dot baldwin dot cx> <5699677F dot 3040808 at redhat dot com>
On Friday, January 15, 2016 09:41:19 PM Pedro Alves wrote:
> On 01/15/2016 08:18 PM, John Baldwin wrote:
> > On Thursday, January 14, 2016 03:07:28 PM Pedro Alves wrote:
> >> [Dropping binutils.]
> >>
> >> On 01/13/2016 09:45 PM, John Baldwin wrote:
> >>> This allows gdb to fetch per-thread registers for multi-threaded FreeBSD
> >>> processes. NetBSD and OpenBSD also accept LWP IDs for ptrace requests
> >>> to fetch per-thread state.
> >>
> >> I'd prefer to make inf-ptrace.c:get_ptrace_pid extern and use
> >> it, instead of duplicating it multiple times.
> >
> > This sounds good to me. Do you want me to use it in other places as well?
> > sparc-nat.c at least duplicates the same logic inline. amd64linux-nat.c
> > does as well. If so, would you rather that be a seperate patch (expose
> > get_ptrace_pid() and use it in existing targets) from this patch?
>
> I won't impose that as requirement, but that'd be nice.
Ok. I made a pass and fixed the ones that I thought were relevant (i.e.
generating a pid to pass to ptrace()). However, the vast majority of the
files changed were various foo-linux-nat.c files which I am not setup to
test. Is there a way to push a branch and have the build bots build it to
do a test build? (Even then I think those would not cover 'nat' files for
s390, hppa, etc.) I'm still happy to include this, just want to ensure I
don't break the build. I'm also not sure if changing these files would
break gdbserver (if gdbserver doesn't include inf-ptrace.o).
--
John Baldwin