This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: New language support question
- From: Daniel Jacobowitz <drow at false dot org>
- To: Kazazakis Vassilis <bkazaz at metawire dot org>
- Cc: gdb at sources dot redhat dot com
- Date: Sun, 1 Jan 2006 17:34:37 -0500
- Subject: Re: New language support question
- References: <Pine.BSO.4.63.0512251701420.25328@metawire.org>
On Sun, Dec 25, 2005 at 05:02:31PM -0500, Kazazakis Vassilis wrote:
> Hi all,
> Me and my project-mate are currently writing a compiler as a project of a
> university course. The target code runs through a virtual machine we
> wrote. We want to debug that language with gdb.
> I did some googling as well as read the gdb internals documentation but it
> didn't help much so as how to modify the gdb sources...
There's two things you may need: language support, which covers
printing types and values and parsing user input, and support for the
virtual machine you're compiling to. For the language support, you'll
need a language definition; take a look at any of the existing ones in
GDB for an example (e.g. C or Fortran). You want a new "struct
language_defn".
For the virtual machine, more work will be necessary - GDB will need to
be able to connect, disassemble, backtrace, et cetera. This is a
target backend.
--
Daniel Jacobowitz
CodeSourcery