This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/3] Add a new debug knob for the FreeBSD native target.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]