VMware

This Question is Possibly Answered

1 "correct" answer available (10 pts) 2 "helpful" answers available (6 pts)
7 Replies Last post: Oct 21, 2009 1:38 PM by Shrinand  

Howto : Debugging Windows Xp host and Linux VM guest or Linux VM Guest to Linux VM GUest posted: Oct 12, 2009 1:29 AM

Click to view ganzorig85's profile Lurker 4 posts since
Oct 9, 2009

Hello

Is there any instruction that How to Debugging Windows Xp host and Linux VM guest. Now I am using Ubuntu 9.04 with kernel 2.6.31. But i can't find any appropriate kernel debugger version for Linux 2.6.31 like kgdb.

Please help me

Click to view ecl100's profile Enthusiast 48 posts since
Sep 24, 2007
Hi, ganzorig85. I'll bet it would be easier to create two Ubuntu 9.04 VMs and debug one from the other. That way you could be assured that gdb could understand symbols, etc. But I must admit that I've never done this myself. I've only ever debugged Linux guests on Linux hosts. E.
Click to view Shrinand's profile Lurker 5 posts since
Jul 2, 2008
Hi ganzorig85,

The vmklinux binary should be present in the main directory where your source code is. I have a 2.6.27 kernel in /usr/src/linux-2.6.27.5/ and I can see the vmlinux binary in /usr/src/linux-2.6.27.5/vmlinux.

You will have to give this file to gdb so that gdb understands the symbols.

Hope that helps.
-Shri
Click to view Shrinand's profile Lurker 5 posts since
Jul 2, 2008
Hey ganzorig85, are you using gdb on Windows? I've never used that.

But from what I understood, you had set up two VMs. One was the debugger (that was running gdb. Let's call this A) and the other was the debuggee (say B).

I wanted to tell you that you should copy the vmlinux file from the debuggee VM to the debugger VM; i.e. from B to A.

Also, have you built the kernel with symbols?
Click to view Shrinand's profile Lurker 5 posts since
Jul 2, 2008
Generally, one uses the gdb server for debugging remotely. Say your target machine is A. And the machine with gdb is B.

Start the gdb server on A. Connect to it using its IP address and port number from machine B (target remote <A's ip>:<A's port #>). And then start debugging using gdb on machine B. However, I'm not if debugging the kernel is possible with this technique.

You should be able to do this if you have a linux host. Start the VM and then connect to it from the host using (target remote localhost:8832) and then start debugging.

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

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