This is the mail archive of the gdb-patches@sources.redhat.com 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: [PATCH] plugin patch


On Tue, 2002-10-29 at 00:27, Eli Zaretskii wrote:
> On Mon, 28 Oct 2002, Scott Moser wrote:
> > Below is a patch to add plugin support to GDB.  It exports a fairly
> > simple programmable interface for people to extend the functionality of
> > GDB via runtime loaded shared libraries in ways that may not fit with
> > the direction of the main GDB tree (not cross-platform, not stable,
> > niche audience...).
> 
> IIRC, the FSF doesn't like to add to GNU software support for dynamically 
> loading arbitrary modules (for fear of non-free libraries being used thru 
> this).

It would be a shame to shun useful functionality due only to a fear of
certain uses.  I know that, for other reasons, the Linux kernel added
licensing information to the kernel modules, to determine whether a
module would 'taint' the kernel.  If it would be helpful to add that
sort of information to the plugin interface to make the patch more
palatable, that could certainly be done.  This could also address
support issues where, for example, GDB crashes because of a bad plugin. 
One could provide a lower level of support (or none) if GDB is
'tainted'.  I think the Linux kernel module licensing awareness was
added mostly to address support issues.

The important thing, though, is that this is very useful functionality
in a small and isolated patch.  One of our goals for making use of GDB
plugins is to add functionality which is "API-aware".  In other words,
add apriori knowledge of the internals or state of a library to GDB, to
greatly enhance the debugging capabilities of GDB **with respect to
that, and only that library**.

A plugin interface would allow that useful functionality without
requiring either library-specific changes to core GDB or maintaining a
GDB patch indefinitely.  Of course, the plugin itself has to be
maintained, especially without a "hardened" ABI (but that's a much
bigger deal for perhaps another day ;)

Regards,
Paul Clarke



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