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: GDB C API -- does such a thing exist?


> No. Well let me qualify.  There is a libgdb, but I have never used it
> and I am not sure anyone has for some many years.  I am not sure how
> maintained it is either. Someone else might know more.

I don't think there is a libgdb anymore. IIRC, Jan eliminated it,
because it was increasing the amount of time needed to be linked
(first generate the .a, next build using the .a).

> A direct C API, aka what we have with Python, while nice, is not
> likely any time soon.  We cannot just expose all of the innards of GDB
> automatically, say with some script, to a C API.  GDB internals were
> never designed to be exposed in such a way.  The API would have to be
> a curated API and I don't see anyone working on that goal at present.
> 
> If you are determined to go the C route, IMO your best bet would be to
> modify GDB directly to your needs and rebuild.  GDB is fairly trivial
> to build.  Less so to modify, but those are your options at the
> moment. ;)

Be aware that there is no stability guaranteed in our C API.
Maybe lldb might provide better guarantees in that respect.
I would personally look at either Python or GDB/MI first.

-- 
Joel


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