From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21127 invoked by alias); 11 Jul 2008 09:57:42 -0000 Received: (qmail 21118 invoked by uid 22791); 11 Jul 2008 09:57:41 -0000 X-Spam-Check-By: sourceware.org Received: from s200aog16.obsmtp.com (HELO s200aog16.obsmtp.com) (207.126.144.130) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 11 Jul 2008 09:57:19 +0000 Received: from source ([164.129.1.35]) (using TLSv1) by eu1sys200aob016.postini.com ([207.126.147.11]) with SMTP; Fri, 11 Jul 2008 09:57:16 UTC Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1C501DAA4 for ; Fri, 11 Jul 2008 09:57:16 +0000 (GMT) Received: from mail1.bri.st.com (mail1.bri.st.com [164.129.8.218]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id C94D04BF5C for ; Fri, 11 Jul 2008 09:57:15 +0000 (GMT) Received: from [164.129.12.194] (bri0669.bri.st.com [164.129.12.194]) by mail1.bri.st.com (MOS 3.8.7a) with ESMTP id CKK35629 (AUTH stubbsa); Fri, 11 Jul 2008 10:51:56 +0100 (BST) Message-ID: <48772D22.1050602@st.com> Date: Fri, 11 Jul 2008 09:57:00 -0000 From: Andrew STUBBS User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: Move GDB to C++ ? References: <487658F7.1090508@earthlink.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2008-07/txt/msg00110.txt.bz2 Tom Tromey wrote: > I think GDB is nearly written in a dialect of C++ already: ... > In all these cases, the C++ code is, in my opinion, simpler to read > and write than the corresponding gdb code. It is also more regular; > whereas in gdb some "virtual methods" take a 'this' pointer, some do > not; some classes have destructors, some do not (these are both things > I ran into on the Python branch). Finally, C++ provides better > support for abstraction, specifically via access control. I tend to agree with this statement. In particular I would say that destructors would be much easier to follow than cleanups. I'm not going to make any judgement about whether there's a business case for doing the work, but here's a question: 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? Andrew