aboutsummaryrefslogtreecommitdiff
path: root/gdb/ChangeLog
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2016-11-21 16:26:20 -0700
committerTom Tromey <tom@tromey.com>2017-01-10 19:14:11 -0700
commitbef155c3e8a995fcdb1c2ba5aba012eb653d9f30 (patch)
tree50b429ebc20397db99dbb753e5ce9f72fe7e9fde /gdb/ChangeLog
parent192b62ce0b4bb5c61188f570e127a26d2c32f716 (diff)
downloadgdb-bef155c3e8a995fcdb1c2ba5aba012eb653d9f30.zip
gdb-bef155c3e8a995fcdb1c2ba5aba012eb653d9f30.tar.gz
gdb-bef155c3e8a995fcdb1c2ba5aba012eb653d9f30.tar.bz2
Introduce and use gdb::unlinker
This introduces a new class, gdb::unlinker, that unlinks a file in the destructor. The user of this class has the option to preserve the file instead, by calling the "keep" method. This patch then changes the spots in gdb that use unlink in a cleanup to use this class instead. In one spot I went ahead and removed all the cleanups from the function. This fixes one latent bug -- do_bfd_delete_cleanup could refer to freed memory, by decref'ing the BFD before using its filename. 2017-01-10 Tom Tromey <tom@tromey.com> * record-full.c (record_full_save_cleanups): Remove. (record_full_save): Use gdb::unlinker. * gcore.c (do_bfd_delete_cleanup): Remove. (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove cleanups. * dwarf2read.c (unlink_if_set): Remove. (write_psymtabs_to_index): Use gdb::unlinker. * common/gdb_unlinker.h: New file.
Diffstat (limited to 'gdb/ChangeLog')
-rw-r--r--gdb/ChangeLog11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 57f21c2..f1e6458 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,16 @@
2017-01-10 Tom Tromey <tom@tromey.com>
+ * record-full.c (record_full_save_cleanups): Remove.
+ (record_full_save): Use gdb::unlinker.
+ * gcore.c (do_bfd_delete_cleanup): Remove.
+ (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
+ cleanups.
+ * dwarf2read.c (unlink_if_set): Remove.
+ (write_psymtabs_to_index): Use gdb::unlinker.
+ * common/gdb_unlinker.h: New file.
+
+2017-01-10 Tom Tromey <tom@tromey.com>
+
* windows-tdep.c (windows_xfer_shared_library): Update.
* windows-nat.c (windows_make_so): Update.
* utils.h (make_cleanup_bfd_unref): Remove.