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, 2006-08-21 at 18:59 +0100, Cai Qian wrote:
> Hi,
> 
> On 8/21/06, Neo <cjia@cse.unl.edu> wrote:
> > Cai,
> >
> > I am wondering why you need to debug the VM remotely. Maybe you have
> > your own requirements, such as for embedded systems. But I think you
> > need to first make sure you can debug any binary running on your target
> > board remotely. Then, you can treat the VM as the rest ordinary binary.
> >
> 
> I don't want to debug VM itself here, but executable running on the
> VM. As my VM has a new instruction set, and GDB is quite unlikely to
> run locally.

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.

2) You need to teach gdb to understand the architecture of 
your virtual machine -- the word size, the instruction language, 
the register set, and so forth.  That doesn't mean porting gdb
to RUN on the VM -- it just means teaching gdb how to DEBUG
the VM (meaning, debug something that is running in the VM).






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