diff options
author | Tom Tromey <tom@tromey.com> | 2018-09-15 14:45:51 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-09-18 10:18:04 -0600 |
commit | c9e0a7e333107ad140d9e15110f8820115921555 (patch) | |
tree | 06ca98d31fb652e181a6d236f11365782aadbbcc /gdb/compile/compile-object-run.c | |
parent | 8ff71a9c80cfcf64c54d4ae938c644b1b1ea19fb (diff) | |
download | gdb-c9e0a7e333107ad140d9e15110f8820115921555.zip gdb-c9e0a7e333107ad140d9e15110f8820115921555.tar.gz gdb-c9e0a7e333107ad140d9e15110f8820115921555.tar.bz2 |
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 <tom@tromey.com>
* 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.
Diffstat (limited to 'gdb/compile/compile-object-run.c')
-rw-r--r-- | gdb/compile/compile-object-run.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |