New language support question

Daniel Jacobowitz drow@false.org
Sun Jan 1 22:34:00 GMT 2006


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



More information about the Gdb mailing list