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 in C++


On Mon, 02 Jul 2007 03:35:29 +0200, Joel Brobecker wrote:
...
> However, I think that requiring a C++ compiler will make it harder
> for some users to build GDB, just because C++ compilers are not
> always as readily available as C compilers.

For a completeness pointing out there exists GObject - OO system of Gnome,
built on a plain crossplatform C, with rich OO features incl. multiple
inheritance by interfaces, reference counting, weak references,
messaging/notifications (called signals/closures) etc.

http://developer.gnome.org/doc/API/2.0/gobject/
sample of GtkVBox inheriting GtkBox:
	http://svn.gnome.org/viewcvs/gtk%2B/trunk/gtk/gtkvbox.c?view=markup

It has full runtime assertion based type checking for developers
(--enable-debug=yes) while it has zero user-visible overhead as it is turned
off for the final releases.

It misses the C++-native exceptions / cleanups during the unwinding, though.
Also the developers are usually Gnome unaware and so I found out using such
Gnome standard OO systems does not make the code more friendly to them anyway.
Therefore I do not think it would be worth porting GDB on top of GObject.


Regards,
Jan


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