From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76894 invoked by alias); 22 Sep 2016 20:56:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 76876 invoked by uid 89); 22 Sep 2016 20:56:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=documents X-HELO: paperclip.tbsaunde.org Received: from tbsaunde.org (HELO paperclip.tbsaunde.org) (66.228.47.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Sep 2016 20:56:17 +0000 Received: from ball (unknown [IPv6:2607:f0c8:8000:80e0:56ee:75ff:fe52:afb9]) by paperclip.tbsaunde.org (Postfix) with ESMTPSA id 8563DC06E; Thu, 22 Sep 2016 20:56:15 +0000 (UTC) Date: Thu, 22 Sep 2016 23:10:00 -0000 From: Trevor Saunders To: Pedro Alves Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [RFA 0/5] Some random C++-ification Message-ID: <20160922210310.teeeute7dwt7rnpy@ball> References: <1474566656-15389-1-git-send-email-tom@tromey.com> <1ee37f8c-0c1a-7368-4cea-96bbbf43a2af@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1ee37f8c-0c1a-7368-4cea-96bbbf43a2af@redhat.com> User-Agent: NeoMutt/20160910 (1.7.0) X-SW-Source: 2016-09/txt/msg00300.txt.bz2 On Thu, Sep 22, 2016 at 08:08:20PM +0100, Pedro Alves wrote: > On 09/22/2016 06:50 PM, Tom Tromey wrote: > > I was feeling inspired by Pedro's Cauldron slides, so I found a few > > Awesome! :-) > > > random spots that could be converted from cleanups to self-managing > > data structures from libstdc++ -- in these cases, std::string and > > std::vector. > > > > I saw a note in one of the C++ conversion documents about perhaps not > > using std::vector, since GCC did not. However, I think often GCC's > > uses are unusual, and I don't think there is any reason to avoid > > std::vector in (most of) gdb. > > Agreed. yeah, gcc has the "reason" of needing vec to work with gc. gdb might want the perf advantage in auto_vec of using stack storage for short arrays, but that's the only reason I can see to not use std::vector outside of heap data structures. In the heap I think the auto_vec layout is better than std::vector, but again just a perf question. Trev