Date: Tue, 11 Jun 2002 04:36:47 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Arun Sharma <arun@sharma-home.net> Cc: freebsd-hackers@freebsd.org Subject: RE: Kernel hacking questions Message-ID: <XFMail.20020611043647.jhb@FreeBSD.org> In-Reply-To: <20020610033520.GA7795@sharma-home.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 10-Jun-2002 Arun Sharma wrote: > 1. Can I use a SMP kernel and bring it up with just one CPU on a two CPU > machine ? Hmm, on alpha you can, I don't think we support that on i386, but it would be easy enough to tweak. > 2. How do I trace back funcname+offset to a particular line of C code ? > I tried objdump -d and gcc -S, but it's not easy to read. I thought > there was a way to get gcc to interleave the C code and the generated > assembly. gdb's 'l *foo+0x34' works wonders. :) If you are stuck with a kernel.debug on current that gdb doesn't grok, you can use nm to extract the address of the function, add the offset, and use 'addr2line -e kernel.debug 0xc0yyyyyy'. > I have a suspicion that in kern_mutex.c:510, > > if (td1->td_priority < td->td_priority) > > there may be circumstances in which td1 could be pointing to memory that > has been freed. I've got a bunch of panics which result in kernel mode > page faults at 0xdeadxxxx. That would certainly be interesting. :) -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ 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?XFMail.20020611043647.jhb>