From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98287 invoked by alias); 29 Mar 2018 15:28:03 -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 97324 invoked by uid 89); 29 Mar 2018 15:28:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 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.2 spammy=Hx-languages-length:1614 X-HELO: gateway32.websitewelcome.com Received: from gateway32.websitewelcome.com (HELO gateway32.websitewelcome.com) (192.185.145.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 29 Mar 2018 15:28:01 +0000 Received: from cm10.websitewelcome.com (cm10.websitewelcome.com [100.42.49.4]) by gateway32.websitewelcome.com (Postfix) with ESMTP id E850314BEE0D for ; Thu, 29 Mar 2018 10:27:59 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 1ZT5fJqJlcGlp1ZT5f7309; Thu, 29 Mar 2018 10:27:59 -0500 Received: from 174-29-48-109.hlrn.qwest.net ([174.29.48.109]:43322 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1f1ZT5-004CXX-NY; Thu, 29 Mar 2018 10:27:59 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [RFA 2/3] Remove parameter from free_dwo_file Date: Thu, 29 Mar 2018 15:28:00 -0000 Message-Id: <20180329152757.9346-3-tom@tromey.com> In-Reply-To: <20180329152757.9346-1-tom@tromey.com> References: <20180329152757.9346-1-tom@tromey.com> X-BWhitelist: no X-Source-L: No X-Exim-ID: 1f1ZT5-004CXX-NY X-Source-Sender: 174-29-48-109.hlrn.qwest.net (bapiya.Home) [174.29.48.109]:43322 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-SW-Source: 2018-03/txt/msg00596.txt.bz2 The objfile parameter to free_dwo_file is unused, so remove it. gdb/ChangeLog 2018-03-29 Tom Tromey * dwarf2read.c (free_dwo_file): Remove "objfile" parameter. (free_dwo_file_cleanup, free_dwo_file_from_slot): Update. --- gdb/ChangeLog | 5 +++++ gdb/dwarf2read.c | 12 ++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 7840496738..1ab073804d 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -13513,13 +13513,11 @@ queue_and_load_all_dwo_tus (struct dwarf2_per_cu_data *per_cu) } /* Free all resources associated with DWO_FILE. - Close the DWO file and munmap the sections. - All memory should be on the objfile obstack. */ + Close the DWO file and munmap the sections. */ static void -free_dwo_file (struct dwo_file *dwo_file, struct objfile *objfile) +free_dwo_file (struct dwo_file *dwo_file) { - /* Note: dbfd is NULL for virtual DWO files. */ gdb_bfd_unref (dwo_file->dbfd); @@ -13533,9 +13531,8 @@ free_dwo_file_cleanup (void *arg) { struct free_dwo_file_cleanup_data *data = (struct free_dwo_file_cleanup_data *) arg; - struct objfile *objfile = data->dwarf2_per_objfile->objfile; - free_dwo_file (data->dwo_file, objfile); + free_dwo_file (data->dwo_file); xfree (data); } @@ -13546,9 +13543,8 @@ static int free_dwo_file_from_slot (void **slot, void *info) { struct dwo_file *dwo_file = (struct dwo_file *) *slot; - struct objfile *objfile = (struct objfile *) info; - free_dwo_file (dwo_file, objfile); + free_dwo_file (dwo_file); return 1; } -- 2.13.6