Commit d8f2e87b by Andrew Haley Committed by Andrew Haley

natStackTrace.cc (fillInStackTrace): Throw #ifdef (HAVE_BACKTRACE) around the whole function body.

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
parent 9148659d
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.
......
......@@ -44,16 +44,15 @@ details. */
#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)
{
......@@ -86,6 +85,10 @@ gnu::gcj::runtime::StackTrace::fillInStackTrace (jint maxlen, jint offset)
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. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment