This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/3] Add a new debug knob for the FreeBSD native target.
- 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, 02 Mar 2018 14:44:55 -0800
- Subject: Re: [PATCH 2/3] Add a new debug knob for the FreeBSD native target.
- Authentication-results: sourceware.org; auth=none
- References: <20180228014656.32372-1-jhb@FreeBSD.org> <20180228014656.32372-3-jhb@FreeBSD.org> <d1c72039-6f96-be7b-d104-cd9f18f1935c@redhat.com>
On Friday, March 02, 2018 08:19:33 PM Pedro Alves wrote:
> LGTM, but one small question below.
>
> On 02/28/2018 01:46 AM, John Baldwin wrote:
> > @@ -765,6 +765,7 @@ fbsd_xfer_partial (struct target_ops *ops, enum target_object object,
> >
> > #ifdef PT_LWPINFO
> > static int debug_fbsd_lwp;
> > +static int debug_fbsd_nat;
>
> Should this be guarded by PT_LWPINFO? Wouldn't you want to
> enable fbsd-nat debugging on FreeBSD systems without PT_LWPINFO?
So fbsd-nat omits a lot of functionality including custom to_wait/to_resume
methods where debug_fbsd_nat is used both in this patch and the next one for
systems without PT_LWPINFO. There isn't a way to fetch the siginfo to parse
the trap code without PT_LWPINFO for example. I don't expect to be adding
any new features that would use this debugging on systems without PT_LWPINFO
at this point. For reference, PT_LWPINFO was added to FreeBSD in 5.0 release
which was released back in 2003. The last release which didn't support it
was 4.11 released in January 2005.
> (Hmm, does GDB actually build today if PT_LWPINFO is not defined?)
I believe it should, but given how old of a FreeBSD version you'd need for
this to matter, I should perhaps require it to simplify the #ifdef forest
in the FreeBSD native target a bit.
--
John Baldwin