This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]