This is the mail archive of the gdb@sources.redhat.com 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]

Re: GDB and Virtual Machines


(I came accross this message from Dec 15 while browing the archives.)

> I am currently performing the daunting job of investigating the use
> of GDB (and probably Insight) for debugging a proprietary language
> (a domain specific language) that runs as interpreted "p-code" in a
> proprietary virtual machine.  This is a scheme similar to the way
> Java runs.

You might want to take a look at the Java Platform Debugger Architecture 
at http://java.sun.com/j2se/1.3/docs/guide/jpda/index.html .  I don't
know how close your VM is to the JVM, but if you could implement some
variant of the JDWP (Java Debugger Wire Protocol) it would be cool.
Even if you have no use for JVM per se, there are some reasons for
starting with the JDWP:
* Some of the design work has already been done.
* You are more likely to get people to help you.
* More people are might use your code so it gets tested more.
* You are more likely to get your changes accepted into the gdb
sources.  (Maintaining your own version of gdb is to be avoided!)
* It is possible you might be able to use other Java debuggers
and IDEs to debug your VM.  For example NetBeans (see netbeans.org)
is on open-source Java IDE, which claims to be quite modular, and
you could probably modify to handle your own VM.

An alternative would be to map your VM into the existing gdb
remote serial protocol.  You would also create a machine description
that matches your VM.  This means a BDF target for your target etc.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

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