This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[gold][patch] Don't cleanup if debugging
- From: Rafael Espindola <espindola at google dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Diego Novillo <dnovillo at google dot com>, Cary Coutant <ccoutant at google dot com>
- Date: Tue, 3 Nov 2009 16:24:27 -0500
- Subject: [gold][patch] Don't cleanup if debugging
What used to be asserts are now LDPL_FATAL calls into the linker. They
still abort, but they call the cleanup handler. One user visible
difference is that the temporary files are removed. This is good in a
normal execution, but bad during debugging. The attached patch avoids
removing files if in debug mode.
2009-11-03 Rafael Avila de Espindola <espindola@google.com>
* lto-plugin.c (cleanup_handler): Don't cleanup if debugging.
Cheers,
--
Rafael Ãvila de EspÃndola
diff --git a/lto-plugin/lto-plugin.c b/lto-plugin/lto-plugin.c
index 48a3b18..1dddabc 100644
--- a/lto-plugin/lto-plugin.c
+++ b/lto-plugin/lto-plugin.c
@@ -515,6 +515,9 @@ cleanup_handler (void)
char *arguments;
struct stat buf;
+ if (debug)
+ return LDPS_OK;
+
/* If we are being called from an error handler, it is possible
that the arguments file is still exists. */
t = asprintf (&arguments, "%s/arguments", temp_obj_dir_name);