VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
4 Replies Last post: Apr 28, 2009 8:30 AM by grubby23  

Getting started: kernel symbols posted: Apr 8, 2008 6:51 AM

Click to view kevoreilly's profile Lurker 2 posts since
Apr 7, 2008
I have recently heard about the new debugging functionality that has been added to WS6, and I have been trying to get myself up and running remote debugging a linux machine.

However, having read Slava's blog and searched the forum, I am still unsure of one aspect of the setup of remote debugging; specifically kernel symbols. Perhaps my question betrays my lack of understanding or knowledge, but I hope that I am not asking a stupid question, and that others might find the answer helpful.

Basically the question is simple; from where does one obtain the kernel symbols in order to do this, and how exactly are they set up?


I appreciate this may be distro-specific, and the answer might be 'go to your distro's site and find them there somewhere'. I am using Ubuntu, and have used Synaptic to install 'linux-image-debug-2.6.22-14-386' (which matches in version number to the kernel on my 7.10 install) but whether this is the right thing or not I don't know.


Now if I do find the right kernel-with-symbols file that matches the kernel I am running in my virtual Ubuntu installation, do I then have to copy this to the host machine in order to pass to gdb when remote-debugging (as in: "(gdb) file vmlinux-2.4.21-27.EL.debug")? Now this may be obvious, but I can't see it mentioned anywhere.


So I am looking for a wee bit more information on how to get this all up and running, and would really appreciate any help that someone might be able to offer.

Cheers, Kev

Re: Getting started: kernel symbols

1. Apr 8, 2008 9:19 AM in response to: kevoreilly
Click to view slava_malyugin's profile Enthusiast 55 posts since
May 14, 2007

Hello Kevin,

You are right. To debug linux kernel you need to get kernel with symbols and supply it to gdb with "file" command. I have put description of the process here:

http://stackframe.blogspot.com/2007/04/debugging-linux-kernels-with.html

Please let me know if it helps.

Sincerely,

Vyacheslav (Slava) Malyugin

Re: Getting started: kernel symbols

3. Apr 9, 2008 9:12 AM in response to: kevoreilly
Click to view slava_malyugin's profile Enthusiast 55 posts since
May 14, 2007

Kevin, If you can get symbols for stock kernel then you do not need to switch to customer kernel. The RedHat keeps symbols at website I mentioned in post on stackframe.blgospot.com and SuSE kernels frequently have matching symbols on opensuse.org.

Sincerely,

Vyacheslav (Slava) Malyugin

Re: Getting started: kernel symbols

4. Apr 28, 2009 8:30 AM in response to: slava_malyugin
Click to view grubby23's profile Lurker 1 posts since
Apr 28, 2009

Hi Slava,

I have basically the same problem as the original poster. I am running on my host windows and on the VMWare I have Ubuntu running.

Now is the question, where could I get the symbol table for my Kernel: vmlinux-2.6.28? On the redhat site I can see a lot of similar ones,

but can I use one of them e.g.


kernel-debuginfo-2.6.9-55.0.6.EL.i686.rpm\ 352952 KB 31/08/2007 00:00:00
kernel-debuginfo-2.6.9-55.0.9.EL.i686.rpm\ 352967 KB 27/09/2007 00:00:00
kernel-debuginfo-2.6.9-55.EL.i686.rpm\ 348228 KB 21/04/2007 00:00:00
kernel-debuginfo-2.6.9-55.EL.i686.rpm\


many thanks

VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities