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@...>
* lto-plugin.c (cleanup_handler): Don't cleanup if debugging.
Cheers,
--
Rafael Ávila de Espíndola
[cleanup.patch]
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);