how to use libgdb ?

Andrew Cagney ac131313@ges.redhat.com
Thu Sep 19 13:48:00 GMT 2002


For a background see:

http://sources.redhat.com/gdb/papers/libgdb2/
http://sources.redhat.com/gdb/papers/libgdb

(I've also added, slightly edited, one of the more legendary Cygnus 
Internal white papers which is where MI came from.)


> The point is that there will never be a stable ABI.  Speaking just for
> myself, I don't want a hack like this that we can never support.  We
> have a machine interface - MI - and it should give you everything you
> need; if you think communication with GDB has any performance
> implications, you need to think about it a little more.  If you think
> there are functionality gains from bypassing MI then MI should be
> extended.

Yes.

Given that Apple has proven that MI can be made to work, I don't see 
benefit in adding (and hence implicitly supporting) yet another 
interface.  Remember, MI is documented and *tested*, you'll not get that 
with some sort of internal ABI.

It is also very important keep in mind that directly linking GDB to an 
application is not some sort of performance silver bullet.  It isn't. 
Too many other factors influence GDB/GUI performance - screen refresh 
overhead, target step performance, cost of a stack unwind, even system 
load, ...

Having said this, there is a very long term goal of implementing all MI 
and CLI commands using functions of the form gdb_<mi-command-name>(). 
That, however, is very very long term (finished around '10?).  At 
present there are to many internal architectural problems to address.

Andrew




More information about the Gdb mailing list