aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-03-28 15:21:08 -0600
committerTom Tromey <tom@tromey.com>2018-03-30 13:15:57 -0600
commit5dafb3d176ab8d9b9f0a46111d7040bb51ad8f8e (patch)
treeeba4fdac003653f2c4d9b4049a06285b20be4866 /gdb
parent11ed8cada64e717900117364c2fee0132c1eb099 (diff)
downloadgdb-5dafb3d176ab8d9b9f0a46111d7040bb51ad8f8e.zip
gdb-5dafb3d176ab8d9b9f0a46111d7040bb51ad8f8e.tar.gz
gdb-5dafb3d176ab8d9b9f0a46111d7040bb51ad8f8e.tar.bz2
Remove parameter from free_dwo_file
The objfile parameter to free_dwo_file is unused, so remove it. gdb/ChangeLog 2018-03-30 Tom Tromey <tom@tromey.com> * dwarf2read.c (free_dwo_file): Remove "objfile" parameter. (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/dwarf2read.c12
2 files changed, 9 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 9b4675f..61f8131 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,10 @@
2018-03-30 Tom Tromey <tom@tromey.com>
+ * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
+ (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
+
+2018-03-30 Tom Tromey <tom@tromey.com>
+
* dwarf2read.c (class free_cached_comp_units): New class.
(dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
(free_cached_comp_units): Remove function.
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 7840496..1ab0738 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;
}