public inbox for gdb-testers@sourceware.org
help / color / mirror / Atom feed
From: sergiodj+buildbot@sergiodj.net
To: gdb-testers@sourceware.org
Subject: [binutils-gdb] Introduce and use gdb::unlinker
Date: Thu, 12 Jan 2017 06:50:00 -0000	[thread overview]
Message-ID: <bef155c3e8a995fcdb1c2ba5aba012eb653d9f30@gdb-build> (raw)

*** TEST RESULTS FOR COMMIT bef155c3e8a995fcdb1c2ba5aba012eb653d9f30 ***

Author: Tom Tromey <tom@tromey.com>
Branch: master
Commit: bef155c3e8a995fcdb1c2ba5aba012eb653d9f30

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.


             reply	other threads:[~2017-01-12  6:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12  6:50 sergiodj+buildbot [this message]
2017-01-12  6:50 ` Failures on Fedora-s390x-m64, branch master sergiodj+buildbot
2017-01-13  3:01 ` Failures on Fedora-x86_64-native-gdbserver-m32, " sergiodj+buildbot
2017-01-13  3:08 ` Failures on Fedora-x86_64-cc-with-index, " sergiodj+buildbot
2017-01-13  3:11 ` Failures on Fedora-x86_64-native-extended-gdbserver-m64, " sergiodj+buildbot
2017-01-13  3:27 ` Failures on Fedora-x86_64-native-extended-gdbserver-m32, " sergiodj+buildbot
2017-01-13  3:56 ` Failures on Fedora-i686, " sergiodj+buildbot
2017-01-13 16:03 ` Failures on Ubuntu-AArch64-native-gdbserver-m64, " sergiodj+buildbot
2017-01-14  1:10 ` Failures on Debian-s390x-native-extended-gdbserver-m64, " sergiodj+buildbot
2017-01-14  1:59 ` Failures on Debian-s390x-m64, " sergiodj+buildbot
2017-01-20 17:43 ` Failures on Fedora-ppc64be-native-extended-gdbserver-m64, " sergiodj+buildbot
2017-01-20 18:25 ` Failures on Fedora-ppc64be-cc-with-index, " sergiodj+buildbot

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=bef155c3e8a995fcdb1c2ba5aba012eb653d9f30@gdb-build \
    --to=sergiodj+buildbot@sergiodj.net \
    --cc=gdb-testers@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).