From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 61755 invoked by alias); 2 Sep 2015 05:12:49 -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 49975 invoked by uid 89); 2 Sep 2015 05:12:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f49.google.com Received: from mail-pa0-f49.google.com (HELO mail-pa0-f49.google.com) (209.85.220.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 02 Sep 2015 05:12:36 +0000 Received: by padhy1 with SMTP id hy1so19826225pad.1 for ; Tue, 01 Sep 2015 22:12:34 -0700 (PDT) X-Received: by 10.68.98.5 with SMTP id ee5mr52896806pbb.95.1441170754321; Tue, 01 Sep 2015 22:12:34 -0700 (PDT) Received: from seba.sebabeach.org.gmail.com (173-13-178-53-sfba.hfc.comcastbusiness.net. [173.13.178.53]) by smtp.gmail.com with ESMTPSA id s17sm20073902pdl.2.2015.09.01.22.12.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Sep 2015 22:12:33 -0700 (PDT) From: Doug Evans To: Patrick Palka Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/2] Use gdbarch obstack to allocate the TYPE_NAME string in arch_type References: <1440887600-22980-1-git-send-email-patrick@parcs.ath.cx> Date: Wed, 02 Sep 2015 05:12:00 -0000 In-Reply-To: <1440887600-22980-1-git-send-email-patrick@parcs.ath.cx> (Patrick Palka's message of "Sat, 29 Aug 2015 18:33:20 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00030.txt.bz2 Patrick Palka writes: > [ The earlier committed version of this patch was reverted. ] > > Since the type whose name is being set is now being allocated on the > gdbarch obstack, we should allocate its TYPE_NAME on the obstack too. > This reduces the number of individual valgrind warnings for the command > "gdb gdb" from ~300 to ~150. > > Tested on x86_64-unknown-linux-gnu. > > gdb/ChangeLog: > > * gdb_obstack.h (obstack_strdup): Declare. > * gdb_obstack.c (obstack_strdup): Declare. > * gdbarch.sh (gdbarch_obstack_strdup): Declare and define. > * gdbarch.c: Regenerate. > * gdbarch.h: Regenerate. > * gdbtypes.c (arch_type): Use gdbarch_obstack_strdup. LGTM. Thanks!