From owner-freebsd-hackers@FreeBSD.ORG Wed Aug 18 08:35:51 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A656B16A4D0 for ; Wed, 18 Aug 2004 08:35:51 +0000 (GMT) Received: from web53902.mail.yahoo.com (web53902.mail.yahoo.com [206.190.36.212]) by mx1.FreeBSD.org (Postfix) with SMTP id 43EC543D1D for ; Wed, 18 Aug 2004 08:35:51 +0000 (GMT) (envelope-from easyeinfo@yahoo.com) Message-ID: <20040818083550.88034.qmail@web53902.mail.yahoo.com> Received: from [202.168.70.130] by web53902.mail.yahoo.com via HTTP; Wed, 18 Aug 2004 01:35:50 PDT Date: Wed, 18 Aug 2004 01:35:50 -0700 (PDT) From: Dennis George To: freebsd-hackers@freebsd.org In-Reply-To: <4122FBA9.2030105@elischer.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Content-Filtered-By: Mailman/MimeDel 2.1.1 Subject: Re: Kernel Debugging X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Aug 2004 08:35:51 -0000 Hi, Thanks for quick response....... My Vmware is running on Windows XP machine.... In this installed two FreeBSD5.2 vritual machines.... Now can you tell me how do I enable serial communication between them ? And can you tell me any funtion which is called after the call to sysinit (after which the symbols get loaded)... so that I can set a break point on that function by seeing its address by nm Thanks in advance Dennis Julian Elischer wrote: Daniel O'Connor wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wed, 18 Aug 2004 15:41, Dennis George wrote: > >>I am studying the kernel source of FreeBSD. I like to know the flow of >>packets from NIC to different modules of Kernel and then to the >>user-level. I studied the code and identified some of the functions through >>which the kernel handles network packets..... But I want to check from >>where the control goes to that function....... >> >>So I decided to debug the kernel.... since I have only one machine I am >>not checking for kgdb.... I decided to work with DDB so compiled the >>kernel with option DDB and with debugging enabled (-g option). After >>installing the new kernel I rebooted the system and in the boot prompt I >>gave "-d" option to enter the debugging module..... My problem is that I >>can't provide any breakpoints with this method... It gives me error >>saying "symbol not found"..... Can anybody tell me where is the >>problem................ > > > Maybe you should try vmware then you can pretend you have 2 machines :) > > Not sure how to answer your actual question though. In some releases of freebsd.. you can not see symbols at the moment that boot -d stops. for some reason they have not been enabled yet. so use nm to find the address of something that will be called and use the address to set a breakpoint there.. when it stops you will have symbols. I also would suggest vmware.. I've used it very successfully in the past.. you can use the nmdm device to set up s 'serial link' with the virtual machine and debug across that. this is from my web page: ---- A screenshot of a FreeBSD system running under vmware, running X11, with its console output redirected out one serial port (with 'tip' on the other side of the nullmodem), and stopped in the kernel debugger, which is redirected to another serial port (actually the nullmodem driver again)with gdb (in the guise of xxgdb) showing the breakpoint and the current instruction pointer. You can also see that I was running ddb on the console port for a while too, all without disturbing the X11 display. Hopefully a more explicit description of how to do this will be forthcoming. The gif file is here. and the URL for the gif is: http://www.freebsd.org/~julian/VM-Debug_screenshot.gif > > - -- > Daniel O'Connor software and network engineer > for Genesis Software - http://www.gsoft.com.au > "The nice thing about standards is that there > are so many of them to choose from." > -- Andrew Tanenbaum > GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.2.4 (FreeBSD) > > iD8DBQFBIvkh5ZPcIHs/zowRAhWKAJ90opCOwSjJVvWBTy7LhIufOzf/tgCfX+er > n0sG45x5nGJez+nq1PxiZ+g= > =wyB4 > -----END PGP SIGNATURE----- > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" --------------------------------- Do you Yahoo!? Yahoo! Mail is new and improved - Check it out!