AW: libGDB architecture

Martin Baulig martin@home-of-linux.org
Tue Aug 31 12:53:00 GMT 1999


[Outgoing mail bounced due a local mailer problem ... trying to
 resent from another host ... sorry if anyone gets this twice]

jtc@redback.com (J.T. Conklin) writes:

> Can you tell me a bit more about your GUILE interface project?  How
> closely do you track snapshots?  Do you make snapshots of your own?
> Does it make sense to fold what you've done into the master GDB
> sources and maintain them there?

Well, I did not make any snapshots yet (btw. how are they done? Running
`make dist' tells me to look at some etc/ directory but I did not find
anything useful there ... ?). The code is in module gdb-guile in the
GNOME CVS Tree (you can for instance use the web interface at
http://cvs.gnome.org/lxr/source/gdb-guile/ to browse it or look at
http://developer.gnome.org/tools/cvs.html ).

It was my plan to have my work merged into the master GDB sources sometime
in future and maintain it there.

> I use GDB user defined functions extensively, but the limitations of
> the existing command language has made scripts more complicated than
> they should be.  I spent some time last month downloading GUILE with
> a goal of first augmenting the existing command language, then later
> replacing it, and finally replacing some of the C code with scripted
> commands.
> 
> My first idea was to link the interpreter with GDB, have it source a
> initialization script, and create a command that gets the intepreter
> to eval an expression.  At first, the GDB and interpreter would not
> know much about the other 'side', but that would be augmented over
> time.  Unfortunately, when I downloaded GUILE, it wasn't immediately
> obvious where to begin.  For an extension language, it seems to have 
> a high barier to entry.

Currently, I added some commands to gdb:

	guile shell	- Starts a guile interpreter
	guile eval	- Evals rest of line as expression
	guile file	- Evals a file

Also it takes an additional command line argument so you can for instance
say

	gdb-guile -n --batch --guile-eval \
		'(use-modules (gdb corba)) (gdb-corba-main)'

to start up the corba server. 

-- 
Martin Baulig - martin@home-of-linux.org - http://www.home-of-linux.org



More information about the Gdb mailing list