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: plugin interface for GDB


Thiago Jung Bauermann wrote:

> Scott Moser's idea was to have very basic plugin support (loading and
> unloading), and leave to the plugin writer the work of searching which
> internal GDB functions he'd need to use and directly call them from the
> plugin code. I am more inclined to go into a different direction, which
> is to provide an abstraction layer which would expose functionality
> which is potentially useful for a plugin.

You should read the recent threads about adding scripting support to
gdb.  The one from several months ago
<http://sourceware.org/ml/gdb/2007-01/threads.html#00126> seemed to
mostly converge on Python, with tcl and guile as runners up.

To me it seems like it would be a lot easier to go in that direction
than to actually allow for plugins in the sense of dynamically loading a
shared module of compiled code.  In either case, you have to implement
some kind of API that exposes the internals of gdb to the plugin or the
script, and in either case you can extend the functionality of gdb in
pretty much arbitrary ways.  But in the case of scripting you don't have
ABI headaches to worry about, and  it increases accessilbility since you
can express relatively high level concepts easily in just a short amount
of python script, compared to having to code the same amount of
functionality with a C plugin.

Brian


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