From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14523 invoked by alias); 28 Jun 2017 21:33:17 -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 14266 invoked by uid 89); 28 Jun 2017 21:33:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=paint X-HELO: mail-wr0-f182.google.com Received: from mail-wr0-f182.google.com (HELO mail-wr0-f182.google.com) (209.85.128.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Jun 2017 21:33:15 +0000 Received: by mail-wr0-f182.google.com with SMTP id 77so180597368wrb.1 for ; Wed, 28 Jun 2017 14:33:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hArIGIuDFzR0HHUI7/4U9Sc4D6nAaxLt+ZIHuCybVyk=; b=bOge96oMj47N9wuz6BpAUepl5b66b0b9SRAqhQerKGU2LffaXidHE7TbxHykuOV7z9 fg7vs3IM94bA4Rrji7c3sqxIgL2OGQ89Q7B3T7nxPnsCSa2E1nD4kHIcoRLzcyvncYpm /WXdb98/DxSjDmTq2g3/7i7y+AakOYj4bhOcK9f6xfLsLSHBi5dHtJ6cmcHEsPq+c4cV nsYpu57lDgKZ+ydbCYEJTbWmhmrGwpAqT7DapHNmVtVpyOa/ZD+s694KvryW93iFrdrI S/rxL8t/Wpeg1QrtNpthmrvJcw6WUwze17paUFCS1qJvRex6eYdIOMOj8Og750H3poWl /Ktw== X-Gm-Message-State: AKS2vOwfFU4P8iI93xG08JwUtf7Y2MJR+8T4Zy62mOQWkTwQQmbnesNX R8rcxrUIwK7B5JB/ X-Received: by 10.223.163.85 with SMTP id d21mr22372402wrb.95.1498685593658; Wed, 28 Jun 2017 14:33:13 -0700 (PDT) Received: from localhost ([2a02:c7d:8ead:7d00:cd4c:ef8b:7838:db06]) by smtp.gmail.com with ESMTPSA id y2sm7997152wme.12.2017.06.28.14.33.12 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Jun 2017 14:33:13 -0700 (PDT) Date: Wed, 28 Jun 2017 21:33:00 -0000 From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 02/40] Eliminate make_cleanup_obstack_free, introduce auto_obstack Message-ID: <20170628213306.wjb3wwhudloe6vsm@localhost> References: <1496406158-12663-1-git-send-email-palves@redhat.com> <1496406158-12663-3-git-send-email-palves@redhat.com> <86lgoce6vh.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20161104 (1.7.1) X-IsSubscribed: yes X-SW-Source: 2017-06/txt/msg00776.txt.bz2 On 17-06-28 15:39:28, Pedro Alves wrote: > > A little, but not very seriously. I did name the type as "auto_" > thinking that that's what GCC folks tend to name their > container/RAII types. > > But OTOH, it feel a bit too early to propose that; it feels like > we could do more with extending the auto_obstack API; but OTOH I'm The reason I suggest to "upstream" it is its simplicity, and it doesn't use any c++ 11 feature. > not sure whether we'll continue to use obstacks directly that much; > I suspect that we may end up with allocators instead, thought > I haven't given that that much thought. Agreed. The reason I read your patch again is that I want to class-fy some structures (frame_unwind for example) which are allocated on obstack. > > Also, I think that it couldn't be put in include/obstack.h, > since the obstack API requires that you define the > obstack_chunk_alloc/obstack_chunk_free macros (and GCC > defines those differently from us, which would be recipe > for ODR violations). > > Also, unfortunately GCC is still C++03, and I didn't want to > paint myself into a corner. :-) > No problem, that is fine to keep it in GDB. -- Yao