From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25003 invoked by alias); 11 Jul 2007 21:04:18 -0000 Received: (qmail 24994 invoked by uid 22791); 11 Jul 2007 21:04:17 -0000 X-Spam-Check-By: sourceware.org Received: from pauline.vellum.cz (HELO pauline.vellum.cz) (89.250.243.234) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 11 Jul 2007 21:04:09 +0000 Received: from host0.dyn.jankratochvil.net (localhost.localdomain [127.0.0.1]) by pauline.vellum.cz (8.12.11.20060308/8.12.11) with ESMTP id l6BL44XA032204 for ; Wed, 11 Jul 2007 23:04:05 +0200 Received: from host0.dyn.jankratochvil.net (localhost [127.0.0.1]) by host0.dyn.jankratochvil.net (8.14.1/8.13.8) with ESMTP id l6BL43Bm026596 for ; Wed, 11 Jul 2007 23:04:04 +0200 Received: (from jkratoch@localhost) by host0.dyn.jankratochvil.net (8.14.1/8.14.1/Submit) id l6BL42aO026595 for gdb@sourceware.org; Wed, 11 Jul 2007 23:04:02 +0200 Date: Wed, 11 Jul 2007 21:04:00 -0000 From: Jan Kratochvil To: gdb@sourceware.org Subject: Re: GDB in C++ Message-ID: <20070711210402.GA26350@host0.dyn.jankratochvil.net> References: <46866F20.2010902@eagercon.com> <20070701205355.GC24316@caradoc.them.org> <20070702013529.GC6627@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070702013529.GC6627@adacore.com> User-Agent: Mutt/1.5.14 (2007-02-12) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-07/txt/msg00101.txt.bz2 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