* *
* C Implementation File *
* *
- * Copyright (C) 2004-2005, AdaCore *
+ * Copyright (C) 2004-2007, AdaCore *
* *
* GNAT is free software; you can redistribute it and/or modify it under *
* terms of the GNU General Public License as published by the Free Soft- *
tailored callback and carried-on datastructure to keep track of the
input parameters we got as well as of the basic processing state. */
+/******************
+ * trace_callback *
+ ******************/
+
+#if !defined (__USING_SJLJ_EXCEPTIONS__)
+
typedef struct {
void ** traceback;
int max_len;
int n_entries_filled;
} uw_data_t;
-/******************
- * trace_callback *
- ******************/
-
#if defined (__ia64__) && defined (__hpux__)
#include <uwx.h>
#endif
return _URC_NO_REASON;
}
+#endif
+
/********************
* __gnat_backtrace *
********************/
void * exclude_min, void * exclude_max,
int skip_frames)
{
+#if defined (__USING_SJLJ_EXCEPTIONS__)
+ /* We have no unwind material (tables) at hand with sjlj eh, and no
+ way to retrieve complete and accurate call chain information from
+ the context stack we maintain. */
+ return 0;
+#else
uw_data_t uw_data;
/* State carried over during the whole unwinding process. */
_Unwind_Backtrace ((_Unwind_Trace_Fn)trace_callback, &uw_data);
return uw_data.n_entries_filled;
+#endif
}