VMware

This Question is Answered

2 "helpful" answers available (6 pts)
8 Replies Last post: Oct 27, 2009 2:32 AM by DAJames  

Debugging kernel shutdown in a linux guest OS posted: Aug 3, 2009 10:22 AM

Click to view DAJames's profile Novice 6 posts since
Aug 3, 2009

I'm trying to investigate the shutdown of a linux kernel. I'm using a (slightly hacked) Ubuntu Hardy 32-bit system running under VMWare Workstation 6.5 on a 64-bit Windows Vista Host (Vista x64 is the standard environment for all developers here).

I've read VMWare provides some debugging support, but I have been unable to find any hard information on the extent of that support, and how to set it up. One of the difficulties I face is that I need to be able to debug the kernel's shutdown/restart sequence, which involves (or can involve, depending on the details of the platform) switching briefly back to real mode ... as I understand it tools like kdb and kgdb aren't able to debug across mode switches (they're protect-mode kernel tools)

I'm hoping that VMWare itself can use its virtualization of the hardware to provide some debugging support (is this how replay-based debugging works?) -- but how?

Cheers,
Daniel.


Re: Debugging kernel shutdown in a linux guest OS

1. Aug 3, 2009 10:34 AM in response to: DAJames
Click to view jmattson's profile Master 1,220 posts since
Mar 29, 2006

Re: Debugging kernel shutdown in a linux guest OS

4. Aug 6, 2009 7:48 AM in response to: DAJames
Click to view jmattson's profile Master 1,220 posts since
Mar 29, 2006
You may want to try a more modern gdb from a Linux box or Linux VM.

Re: Debugging kernel shutdown in a linux guest OS

6. Oct 23, 2009 9:44 PM in response to: DAJames
Click to view gev's profile Lurker 1 posts since
Oct 23, 2009

You already have a working solution but my 2 cents wont hurt.

I ran into the same problem and got stuck til someone suggested i used a different GDB. I got gdb thats part of the cygwin package and that worked pretty well

( Running: 64 bit Vista & Vmware workstation 6.5.2 build-156735 )

Re: Debugging kernel shutdown in a linux guest OS

7. Oct 26, 2009 10:50 PM in response to: gev
Click to view fzkhan's profile Lurker 1 posts since
Oct 26, 2009

Hi gev,

I am also facing the same issue on my 32 bit XP machine.... I have Vmware workstation 6.5.2 build-156735 with fedora 11 as VM. I have added the following lines .vmx file for this VM.

debugStub.listen.guest32.remote = "TRUE"
debugStub.hideBreakpoints= "TRUE"
monitor.debugOnStartGuest32 = "TRUE"

When I start the VM I get a black screen in VM console(display). but when i start remote debugging using gdb i get following errors:

Microsoft Windows XP http://Version 5.1.2600
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\iukhan>gdb
GNU gdb 5.2.1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
(gdb) target remote localhost:8832
localhost:8832: No such file or directory.
(gdb)
(gdb) target remote localhost:8832
localhost:8832: No error.
(gdb) target remote localhost:8834
localhost:8834: No error.
(gdb) target remote localhost:8835
localhost:8835: No error.
(gdb) target remote localhost:8836
localhost:8836: No error.

I tried using gdb thats part of the cygwin package but that results in same issue...any help. Please suggest.

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