Date: Mon, 15 Sep 2014 10:55:04 -0400 From: John Baldwin <jhb@freebsd.org> To: freebsd-current@freebsd.org Cc: Thomas Mueller <mueller6724@bellsouth.net> Subject: Re: Driver-specific debugging in buildkernel? Message-ID: <2511769.1PR7xqNJql@ralph.baldwin.cx> In-Reply-To: <516095.49108.bm@smtp112.sbc.mail.bf1.yahoo.com> References: <516095.49108.bm@smtp112.sbc.mail.bf1.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2511769.1PR7xqNJql>