diff mbox

libbacktrace patch committed: Avoid multiple error messages

Message ID mcrsja0yayl.fsf@google.com
State New
Headers show

Commit Message

Ian Lance Taylor Sept. 29, 2012, 5:50 p.m. UTC
PR 54749 points out that if libbacktrace fails to read the debug info
from the executable (in the case of that PR, due to memory exhaustion)
the compiler will print multiple error messages.  The library already
has a mechanism to avoid this, and this patch uses that mechanism.
Bootstrapped and ran libbacktrace testsuite on x86_64-unknown-linux-gnu.
Committed to mainline.

Ian


2012-09-29  Ian Lance Taylor  <iant@google.com>

	PR other/54749
	* fileline.c (fileline_initialize): Pass errnum as -1 when
	reporting that we could not read executable information after a
	previous failure.
diff mbox

Patch

Index: fileline.c
===================================================================
--- fileline.c	(revision 191853)
+++ fileline.c	(working copy)
@@ -63,7 +63,7 @@  fileline_initialize (struct backtrace_st
 
   if (failed)
     {
-      error_callback (data, "failed to read executable information", 0);
+      error_callback (data, "failed to read executable information", -1);
       return 0;
     }