From owner-freebsd-hackers Tue Jun 11 1:37:25 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mail.speakeasy.net (mail16.speakeasy.net [216.254.0.216]) by hub.freebsd.org (Postfix) with ESMTP id 074CA37B400 for ; Tue, 11 Jun 2002 01:36:57 -0700 (PDT) Received: (qmail 3013 invoked from network); 11 Jun 2002 08:36:55 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail16.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 11 Jun 2002 08:36:55 -0000 Received: from laptop.baldwin.cx ([206.187.69.211]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g5B8arQ81397; Tue, 11 Jun 2002 04:36:53 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020610033520.GA7795@sharma-home.net> Date: Tue, 11 Jun 2002 04:36:47 -0400 (EDT) From: John Baldwin To: Arun Sharma Subject: RE: Kernel hacking questions Cc: freebsd-hackers@freebsd.org Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 <>< 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