Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFA 2/3] Remove parameter from free_dwo_file
Date: Thu, 29 Mar 2018 15:28:00 -0000	[thread overview]
Message-ID: <20180329152757.9346-3-tom@tromey.com> (raw)
In-Reply-To: <20180329152757.9346-1-tom@tromey.com>

The objfile parameter to free_dwo_file is unused, so remove it.

gdb/ChangeLog
2018-03-29  Tom Tromey  <tom@tromey.com>

	* 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


  reply	other threads:[~2018-03-29 15:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-29 15:28 [RFA 0/3] remove last cleanups from dwarf2read.c Tom Tromey
2018-03-29 15:28 ` Tom Tromey [this message]
2018-03-29 15:28 ` [RFA 3/3] Remvoe free_dwo_file_cleanup Tom Tromey
2018-03-30 16:30   ` Simon Marchi
2018-03-30 16:31     ` Simon Marchi
2018-03-29 15:34 ` [RFA 1/3] Remove free_cached_comp_units cleanups Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180329152757.9346-3-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox