OK, a little more detail:
I'm running VMware Workstation 6.5.1. build 126130 on Vista x64 SP1 (VMware's "About" dialog actually says its "Microsoft Windows Server 'Longhorn' Business x64 6.0.6001, Service Pack 1" but I'm pretty sure this is really a standard Vista desktop install and not 2008 server). The hardware is a Dell dual quad-core Xeon (E5420) with 8GB. Microsoft Visual Studio (both 2005 and 2008) is installed, as is the VMware virtual debugger plug-in. I've been using VS2005 for some Windows-side development on the host, but haven't used the virtual debugger so I can't confirm that that works. Visual Studio is NOT running when I try to debug the linux VM. I know that there's a newer version of Workstation (6.5.2) but the release notes suggest that the changes are minor so I haven't yet attempted to upgrade (better the devil you know ..).
The guest OS is basically Ubuntu 8.04.2 (Hardy Heron) with a few extra packages and some kernel-level code of my own that I want to be able to debug. I have rebuilt the kernel (with standard configuration) so I can change that and add options in any way that's needed to help with debugging ... but I'm not sure what may be needed to support VMware's debugging.
The gdb I'm trying to use is GNU gdb 5.2.1 (from sourceforge). I downloaded a (32-bit) Windows binary (.exe installer) and I'm using it without change.
I have added the lines:
debugStub.listen.guest32.remote = "TRUE"
debugStub.hideBreakpoints= "TRUE"
monitor.debugOnStartGuest32 = "TRUE"
to the .vmx file for this VM. When I start the VM I get a black screen in VMware and a wait cursorfor a few seconds, which I guess is the VM starting and waiting for connection from the debugger.
When I run gdb in a Vista command window I get:
D:\VMs\Ubuntu_8.04.2>"c:\Program Files (x86)\mingw\bin\gdb.exe"
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 error.
(gdb) continue
The program is not being run.
(gdb)
(this is not the "gdb crashes" result that I reported before, I haven't been able to reproduce that).
As I understand it "The program is not being run." is not what I should expect to see ... but I don't know how to work out what's going on. I believe port 8832 is correct for a 32-bit guest OS (but I tried 8864and got exactly the same result).
I run VMware workstation with administrator rights (my account on my PC here is a local administrator, but we run with UAC enabled so I start VMware with "Run As Administrator" -- I've found that Windows VMs run OK without admin rights but Ubuntu doesn't ... however, I think that's a different issue) -- I have tried running gdb both with and without admin rights, but the result is the same.
What's going on here?