diff mbox

PATCH COMMITTED: Fix libbacktrace bootstrap on Darwin

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

Commit Message

Ian Lance Taylor Sept. 17, 2012, 5:44 p.m. UTC
It didn't take long to find a build problem with libbacktrace.  I forgot
to back and retest the unknown cases after changing the way backtrace
state was handled.  This patch should fix bootstrap.  Tested on
x86_64-unknown-linux-gnu, which proves little since the file is not used
on that platform.  Committed to mainline.

Ian


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

	PR bootstrap/54609
	* unknown.c (unknown_fileline): Add state parameter, remove
	fileline_data parameter, name error_callback parameter.
	(backtrace_initialize): Add state parameter.
diff mbox

Patch

Index: unknown.c
===================================================================
--- unknown.c	(revision 191397)
+++ unknown.c	(working copy)
@@ -40,9 +40,9 @@  POSSIBILITY OF SUCH DAMAGE.  */
 /* A trivial routine that always fails to find fileline data.  */
 
 static int
-unknown_fileline (void *fileline_data ATTRIBUTE_UNUSED,
+unknown_fileline (struct backtrace_state *state ATTRIBUTE_UNUSED,
 		  uintptr_t pc, backtrace_full_callback callback,
-		  backtrace_error_callback ATTRIBUTE_UNUSED,
+		  backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
 		  void *data)
 
 {
@@ -53,12 +53,12 @@  unknown_fileline (void *fileline_data AT
    debug info.  */
 
 int
-backtrace_initialize (int descriptor ATTRIBUTE_UNUSED,
+backtrace_initialize (struct backtrace_state *state ATTRIBUTE_UNUSED,
+		      int descriptor ATTRIBUTE_UNUSED,
 		      backtrace_error_callback error_callback ATTRIBUTE_UNUSED,
-		      void *data ATTRIBUTE_UNUSED, fileline *fileline_fn,
-		      void **fileline_data)
+		      void *data ATTRIBUTE_UNUSED, fileline *fileline_fn)
 {
+  state->fileline_data = NULL;
   *fileline_fn = unknown_fileline;
-  *fileline_data = NULL;
   return 1;
 }