From c9e0a7e333107ad140d9e15110f8820115921555 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 15 Sep 2018 14:45:51 -0600 Subject: Remove munmap_listp_free_cleanup This removes munmap_listp_free_cleanup, replacing it with a std::unique_ptr at one spot and an explicit delete in another. It seemed simplest to completely change this data structure. gdb/ChangeLog 2018-09-18 Tom Tromey * compile/compile-object-run.c (do_module_cleanup): Use delete. * compile/compile-object-load.c (struct munmap_list): Move to header file. (munmap_list::add): Rename from munmap_list_add; rewrite. (munmap_list::~munmap_list): Rename from munmap_list_free. (munmap_listp_free_cleanup): Remove. (compile_object_load): Update. * compile/compile-object-load.h (struct munmap_list): Move from compile-object-load.c. Rewrite. --- gdb/compile/compile-object-run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/compile/compile-object-run.c') diff --git a/gdb/compile/compile-object-run.c b/gdb/compile/compile-object-run.c index 0846c73..f3ec932 100644 --- a/gdb/compile/compile-object-run.c +++ b/gdb/compile/compile-object-run.c @@ -99,7 +99,7 @@ do_module_cleanup (void *arg, int registers_valid) unlink (data->source_file); xfree (data->source_file); - munmap_list_free (data->munmap_list_head); + delete data->munmap_list_head; /* Delete the .o file. */ unlink (data->objfile_name_string); -- cgit v1.1