From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23056 invoked by alias); 5 Apr 2012 00:22:39 -0000 Received: (qmail 23047 invoked by uid 22791); 5 Apr 2012 00:22:38 -0000 X-SWARE-Spam-Status: No, hits=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pz0-f54.google.com (HELO mail-pz0-f54.google.com) (209.85.210.54) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Apr 2012 00:22:25 +0000 Received: by dady13 with SMTP id y13so913354dad.13 for ; Wed, 04 Apr 2012 17:22:25 -0700 (PDT) Received: by 10.68.195.163 with SMTP id if3mr267623pbc.127.1333585344763; Wed, 04 Apr 2012 17:22:24 -0700 (PDT) Received: from [192.168.0.107] ([120.199.57.178]) by mx.google.com with ESMTPS id g4sm1662138pbt.58.2012.04.04.17.22.21 (version=SSLv3 cipher=OTHER); Wed, 04 Apr 2012 17:22:23 -0700 (PDT) Message-ID: <4F7CE5FA.2000208@gmail.com> Date: Thu, 05 Apr 2012 00:22:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: Will therefore GDB utilize C++ or not? References: <20120330161403.GA17891@host2.jankratochvil.net> <87aa2rjkb8.fsf@fleche.redhat.com> In-Reply-To: <87aa2rjkb8.fsf@fleche.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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-04/txt/msg00046.txt.bz2 On 2012-4-5 4:47, Tom Tromey wrote: > My view is that GDB is already written in a poor cousin of C++. > Nearly every feature that people hate about C++ is already in use in > GDB. This list is not exhaustive, just informational: > > * Subclasses. See general_symbol_info. struct value and struct type > would be improved by them. > > * Virtual functions. gdbarch, languages, and values all use these. > > * Overloaded functions. Anywhere you see a _1 suffix. > > * Templates. Both observers and VEC are templates. > > * Exceptions. Used ubiquitously. > > * RAII. Cleanups, but they are dynamic and more error-prone. > > * Even global constructors -- init.c. > > In most cases, GDB's implementation of these features is inferior to > that of the C++ compiler. Agreed. Simulate C++ feature in plain C style macros and callbacks are boring and hard to maintain. BTW: There are some discussion about C++ in GCC 4.8, maybe, your gdb administrators (committee) can also give a plane. Asmwarrior Code::Blocks developer