Re: Driver-specific debugging in buildkernel?

From: John Baldwin <jhb_at_freebsd.org>
Date: Mon, 15 Sep 2014 10:55:04 -0400
On Sunday, September 14, 2014 07:56:16 PM Thomas Mueller wrote:
> I want to build a kernel with debugging for a specific device, rather than
> for everything.
> 
> Device of interest is re (Ethernet driver), also rsu (USB wlan adapter).
> 
> I looked in Makefiles, also NOTES files, found some xxxxDEBUG options but
> nothing really general that could be applied to any desired device in
> kernel or module.
> 
> Then I would need to know how to find this debugging information.

There isn't a generic "debugging for driver X" knob.  You can enable global 
debugging (e.g. INVARIANTS).  Some drivers may have their own internal knobs, 
but most drivers depend on the global knobs.  If you are debugging a driver as 
a module, you can build the kernel with INVARIANT_SUPPORT and just the driver 
with INVARIANTS.  However, drivers invariably make calls into other subsystems 
in the kernel and that setup will not include checking for driver misbehavior 
in its interfacing with those subsystems, so I would generally recommend just 
enabling INVARIANTS globally.

-- 
John Baldwin
Received on Mon Sep 15 2014 - 13:27:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:52 UTC