views:

318

answers:

4

Hi all,

I was wondering if anyone knew of a way to remotely debug the Linux kernel running under VMWare (and if so, if there's a way to do it in Windows since linux kind of scares me...). Both are x86. I know VMWare has support for this (I saw a post about remote debugging via gdb), but if there was a way to do it from Windows (i.e. Eclipse CDT or something) that'd be awesome.

Thanks! -Robert

+3  A: 

You're not going to debug the Linux kernel (particularly remotely) using anything but gdb with { kdb | kgdb } extensions in-kernel, unless you write your own debug hooks.

Jed Smith
CDB can access GDB remotely if gdbserver is running... I'm just wondering if anyone has this working?
Robert Fraser
A: 

According to Linus, he would prefer if you do not use a kernel debugger, even on Linux. Good luck getting one to work from Windows :)

Granted, this posting is from several years ago. Maybe he has changed his mind since then???

Justin Ethier
Okay, so linus is an ***wipe. How does this at all address the question? There are several active linux kernel debuggers and kgdb hooks are now in the kernel source.
Robert Fraser
Um, Linus Torvalds is quite far from any derogatory term you could come up with about him. Please get off SO for a second and recompose yourself.
Jed Smith
Dude, did you read the post? He comes across as an elitist bastard
Robert Fraser
A: 

There's a thread where someone got 95% of the way here: http://communities.vmware.com/thread/236251. The one part he's missing is that the source files can't be found, but CDT supports setting a source path different from the symbol file. A bit of messing around and it seems to be working (i.e. I can set breakpoints, see the entire address space, etc.)

Robert Fraser
A: 

I would recommend debugging one Linux VM from another linux VM, if you only have one machine running Windows available.

You're going to have enough difficulty just getting that working, without throwing in something that is as unsupported and untested as what you're currently asking for.

Andy Grover