2002-12-05 Andrew Haley <aph@redhat.com>
* gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Throw
#ifdef (HAVE_BACKTRACE) around the whole function body.
From-SVN: r59855
+2002-12-05 Andrew Haley <aph@redhat.com>
+
+ * gnu/gcj/runtime/natStackTrace.cc (fillInStackTrace): Throw
+ #ifdef (HAVE_BACKTRACE) around the whole function body.
+
2002-12-05 Tom Tromey <tromey@redhat.com>
* java/lang/Class.h (_Jv_SetVTableEntries): Updated declaration.
#include <unwind.h>
-// Fill in this stack trace with N elements starting at offset.
+// Fill in this stack trace with MAXLEN elements starting at offset.
void
gnu::gcj::runtime::StackTrace::fillInStackTrace (jint maxlen, jint offset)
{
-#if defined (HAVE_BACKTRACE)
+#ifdef HAVE_BACKTRACE
offset += 1;
void *_p[maxlen + offset];
len = backtrace (_p, maxlen + offset) - offset;
void **p = _p + offset;
-#endif
_Jv_frame_info *frame;
if (len > 0)
{
frame = NULL;
addrs = reinterpret_cast<gnu::gcj::RawData *> (frame);
+#else // HAVE_BACKTRACE
+ (void)maxlen;
+ (void)offset;
+#endif // HAVE_BACKTRACE
}
/* Obtain the next power-of-2 of some integer. */