From patchwork Thu Jan 23 00:56:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 37489 Received: (qmail 81922 invoked by alias); 23 Jan 2020 00:57:46 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 80305 invoked by uid 89); 23 Jan 2020 00:57:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: gateway23.websitewelcome.com Received: from gateway23.websitewelcome.com (HELO gateway23.websitewelcome.com) (192.185.50.185) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 Jan 2020 00:57:25 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway23.websitewelcome.com (Postfix) with ESMTP id 280AE510E for ; Wed, 22 Jan 2020 18:57:23 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id uQoFityLFkeyDuQoFiwlRP; Wed, 22 Jan 2020 18:57:23 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+4ESgO6P3aA5HUIcPatbhOU0TqcbwpuxsB7QDqVb+gk=; b=XiNSpURb8ZlX7ckEWaHV2keiKs KbrH2q6UpzDVdjk22BMSlAbVCwv44kJGFt4ABNCnOeZ/mTHj/+JAPyEMoRmNWbmlXLqGBJBe4oaaV GLf/YHymzlHCGz/VSua0kc2u6; Received: from 75-166-123-50.hlrn.qwest.net ([75.166.123.50]:40826 helo=bapiya.Home) by box5379.bluehost.com with esmtpa (Exim 4.92) (envelope-from ) id 1iuQoE-004Kis-U3; Wed, 22 Jan 2020 17:57:23 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 17/38] Don't allocate DWO file hash on obstack Date: Wed, 22 Jan 2020 17:56:49 -0700 Message-Id: <20200123005710.7978-18-tom@tromey.com> In-Reply-To: <20200123005710.7978-1-tom@tromey.com> References: <20200123005710.7978-1-tom@tromey.com> This changes allocate_dwo_file_hash_table so that it does not use the objfile obstack to store the contents of the hash table. gdb/ChangeLog 2020-01-22 Tom Tromey * dwarf2/read.c (allocate_dwo_file_hash_table): Don't allocate on obstack. Change-Id: Ic20a618acc7277e56aa18580c68f75c793bef97b --- gdb/ChangeLog | 5 +++++ gdb/dwarf2/read.c | 12 +++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c index 844ff8dc54b..2f87b9d2a50 100644 --- a/gdb/dwarf2/read.c +++ b/gdb/dwarf2/read.c @@ -11462,13 +11462,11 @@ allocate_dwo_file_hash_table (struct objfile *objfile) delete dwo_file; }; - return htab_up (htab_create_alloc_ex (41, - hash_dwo_file, - eq_dwo_file, - delete_dwo_file, - &objfile->objfile_obstack, - hashtab_obstack_allocate, - dummy_obstack_deallocate)); + return htab_up (htab_create_alloc (41, + hash_dwo_file, + eq_dwo_file, + delete_dwo_file, + xcalloc, xfree)); } /* Lookup DWO file DWO_NAME. */