util: clean the 24-bit unused field to avoid an issues
[mesa.git] / src / gallium / auxiliary / util / u_debug_stack.h
index 04eba08f89a759e9bfd86c0e4435bbf10ded8557..fff41a5a9ea0e082cf31ff68fa34a860fcde4d97 100644 (file)
 
 #include <stdio.h>
 
+#ifdef HAVE_LIBUNWIND
+#define UNW_LOCAL_ONLY
+#include <libunwind.h>
+#endif
+
 /**
  * @file
  * Stack backtracing.
@@ -46,15 +51,23 @@ extern "C" {
 /**
  * Represent a frame from a stack backtrace.
  *
- * XXX: Do not change this.
+#if defined(PIPE_OS_WINDOWS) && !defined(HAVE_LIBUNWIND)
+ * XXX: Do not change this. (passed to Windows' CaptureStackBackTrace())
+#endif
  *
  * TODO: This should be refactored as a void * typedef.
  */
 struct debug_stack_frame 
 {
+#ifdef HAVE_LIBUNWIND
+   unw_word_t start_ip;
+   unsigned int off;
+   const char *procname;
+#else
    const void *function;
+#endif
 };
-   
+
 
 void
 debug_backtrace_capture(struct debug_stack_frame *backtrace,