From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20439 invoked by alias); 19 May 2012 21:36:46 -0000 Received: (qmail 20431 invoked by uid 22791); 19 May 2012 21:36:46 -0000 X-SWARE-Spam-Status: No, hits=-3.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_NO,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 19 May 2012 21:36:32 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 912281C70AF; Sat, 19 May 2012 17:36:31 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id qVmP4qvqkjAN; Sat, 19 May 2012 17:36:31 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 20F681C70A9; Sat, 19 May 2012 17:36:31 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 5250E145616; Sat, 19 May 2012 14:36:26 -0700 (PDT) Date: Sat, 19 May 2012 21:36:00 -0000 From: Joel Brobecker To: Daniel Jacobowitz Cc: Tom Tromey , Pedro Alves , Jan Kratochvil , gdb@sourceware.org Subject: Re: Will therefore GDB utilize C++ or not? Message-ID: <20120519213625.GU29339@adacore.com> References: <20120330161403.GA17891@host2.jankratochvil.net> <87aa2rjkb8.fsf@fleche.redhat.com> <4F832D5B.9030308@redhat.com> <87ehqhfenc.fsf@fleche.redhat.com> <20120518215558.GR29339@adacore.com> <87aa14ewyq.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2012-05/txt/msg00099.txt.bz2 > For the record, I stand by my earlier messages in this thread about > code sharing with gdbserver; I think there is plenty of room for a C > gdbserver and a C++ one, and the times when C++ doesn't work on your > target are definitely times when you prefer the simplest possible and > most bulletproof gdbserver. I wouldn't mind something like this either. I don't have much of an idea of what optional features could be better implemented in C++, though, given the fact that GDBserver is a very small piece of code as it is... But that's easy to discuss some other day if someone wants to take that project further. > What I'd really love to see, in C or C++, would be unit testing; > having worked in a unit test intensive environment for the past year, > I think it's a bit nuts that anyone *doesn't*. It seems to me that > there are better tools for this in C++ than in C, but I have > definitely not done a serious investigation of the options. I agree. For one thing, it would allow us to test the observers without have to go through debugging GDB with GDB and make inferior function calls. As an aside, I used to work on an Air Traffic Control system, and did a lot of Unit Testing and Deep Unit Testing. I know from this experience that this is time and effort well invested, and I tend to use them for my own projects as well. -- Joel