Date: Fri, 5 Jan 2001 14:04:15 +0000 (GMT) From: Doug Rabson <dfr@nlsystems.com> To: Doug White <dwhite@resnet.uoregon.edu> Cc: Zhiui Zhang <zzhang@cs.binghamton.edu>, <freebsd-hackers@freebsd.org> Subject: Re: kernel debugging suggestion needed Message-ID: <Pine.BSF.4.31.0101051402350.971-100000@herring.nlsystems.com> In-Reply-To: <Pine.BSF.4.21.0101021402410.38463-100000@resnet.uoregon.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 2 Jan 2001, Doug White wrote: > On Tue, 2 Jan 2001, Zhiui Zhang wrote: > > > > > I have written a KLD and am debugging it. The program often hangs after > > runs for a while (I guess it enters into some dead loop). Is there a way > > to attach to the process and somehow find out which code it is executing > > (with remote debugging or ddb)? > > kld debugging is a bit tricky. Take a look at the debugging macros and > bits that Greg Lehey put together for vinum for a starting point. You have > to calculate the appropriate offset to get to the KLD code in gdb. Not anymore. You can use GDB's "sharelibrary" command to read the symbols of all loaded KLDs. You only need to ensure that the exact same pathname works for both loading the KLD on the target machine and for loading the symbols on the machine running GDB. -- Doug Rabson Mail: dfr@nlsystems.com Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.31.0101051402350.971-100000>