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: Move GDB to C++ ?



> -----Message d'origine-----
> De?: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] De la
> part de Daniel Jacobowitz
> Envoyé?: Friday, July 11, 2008 1:44 PM
> À?: gdb@sourceware.org
> Objet?: Re: Move GDB to C++ ?
> 
> On Fri, Jul 11, 2008 at 10:51:30AM +0100, Andrew STUBBS wrote:
> > A while ago there was some idea of a libgdb that would abstract the
> > debugger back end from the interface (or I may have totally
> misunderstood
> > what the whole thing was about). I haven't heard much about it
> recently,
> > and the libgdb that exists seems to be something of a build artefact,
> > rather than a useful abstraction. If such an idea still exists, what
> > affect would switching to C++ have on that plan? Would it make it
> easier?
> > Or would it just make it incompatible with non-C++ projects?
> 
> I don't think such an idea still exists.  We've sunk our effort into
> MI instead.
> 
> Oddly, even though the idea doesn't exist, it has one user that I know
> of (in the Free Pascal IDE).  The way it works is quite terrifying;
> there's a Pascal interface definition that includes several versions
> of each of GDB's core types for selected GDB versions.

  You can blame ME, I wrote part of that stuff, and it is horrible to 
maintain too...
  Just look at the source:
http://svn.freepascal.org/cgi-bin/viewvc.cgi/trunk/packages/gdbint/src/gdbin
t.pp?view=log

  And the current version does not have all the tweaks
about older GDB releases for which some fields in some of the
structs where missing.
  Another big trouble was the offsets, and I am still not sure
it works correctly for 64 bit architechtures...

  But it is still very useful...

  To come back to the main topic about moving
GDB sources to C++, Ii must confess that I am a
pascal programmer by hart. 
  I only came to C for the beauty of GDB itself!
To be able to add pascal support for GDB (which is still
far from good, but at least usable).
  When I see all the troubles about debugging pascal object/classes,
I suspect that C++ will still also have some subtleties.

  I would really hate to not be able to debug GDB with itself! 
Even nowadays, I still get complaints about incomplete types
when I debug GDB with itself, so I imagine that this would become
much more common.
 
  But I am an old dinosaur, and I also resisted at that time
the move of Free Pascal compiler sources from
pascal objects to classes, because of similar doubts.

  I must confess that some things are now much clearer 
in the implementation of the Free Pascal compiler thanks to that
switch.

  And the argument that we are already using hidden class programming
is quite relevant...
  Using classes is probably a good thing, but I would be scared
that people start to use sophisticated C++ features that I 
do not understand :(


Pierre Muller
Pascal language support maintainer for GDB






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