Date: Sat, 20 Feb 2016 23:38:54 +0200 From: Arto Pekkanen <isoa@kapsi.fi> To: Eax Melanhovich <afiskon@devzen.ru> Cc: =?UTF-8?Q?Jean-S=C3=A9bastien_P=C3=A9dron?= <dumbbell@freebsd.org>, freebsd-x11@freebsd.org, owner-freebsd-x11@freebsd.org Subject: Re: Guide to contribute to kernel video drivers Message-ID: <18aa3dde9444d374eb3d665b850c621e@kapsi.fi> In-Reply-To: <20160220104349.2bc8b22a@fujitsu> References: <56C708E9.8050203@FreeBSD.org> <20160220104349.2bc8b22a@fujitsu>
next in thread | previous in thread | raw e-mail | index | archive | help
Eax Melanhovich kirjoitti 20.02.2016 09:43: > Hello > > Thanks a lot for a guide! > > I have a few questions. > > Do I right understand that the only way to debug a kernel is to crash > it and then analyze a dump using gdb? Is it possible to attach to a > running kernel remotely? > What you probably want to do is force the target kernel (on the machine to be debugged) to enter into DDB (kernel debugger) at boot, and then use DDB to do the debugging work (set break points etc). After DDB has started, you can make it work with GDB on another machine via serial port. Here is a short tutorial for using DDB, which explains how to break into DDB on boot among other things: https://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-online-ddb.html And here is the part explaining how to use GDB on remote: https://www.freebsd.org/doc/en/books/developers-handbook/kerneldebug-online-ddb.html Intel also published a pretty good hands-on guide: https://software.intel.com/sites/default/files/profiling_debugging_freebsd_kernel_321772.pdf That being said, I've never done online kernel debugging myself. But the resources I referenced here give a pretty good idea on what can be done. -- Arto Pekkanen
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?18aa3dde9444d374eb3d665b850c621e>