This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Virtual Machine and GDB


On Mon, Aug 21, 2006 at 11:28:12AM -0700, Michael Snyder wrote:
> OK, so you have two issues:
> 1) You need to get gdbserver running in your VM, and provide 
> some means for gdbserver to talk to a gdb that is running in the
> outside world.  Unles you have access to a serial port, the 
> obvious way to do this is to get a IP stack running in the VM, 
> assign it an IP address, and let gdbserver open up a socket.
> Then gdb (running somewhere outside of the VM) can attach to
> the socket.

What sort of VM are we talking about here?  I think a lot of the
responses have been assuming different meanings for that term.

If it's a bytecode language, like a Java Virtual Machine, then
you don't want this at all.  You would have to have multiple processes
in the VM, plus an internal debug interface allowing one process to
debug another.  Instead, think of it more like a simulator; the
virtual machine monitor can talk directly to GDB.

If it's a whole system simulator, more like qemu or vmware, then
maybe you want to have a stub running on the inside.

-- 
Daniel Jacobowitz
CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]