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: New language support question


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


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