summaryrefslogtreecommitdiff
path: root/libjava/jvmti.cc
diff options
context:
space:
mode:
authorkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-13 02:44:51 +0000
committerkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-02-13 02:44:51 +0000
commit3012256a4ae4c12091124a3d24cb152a376fac8b (patch)
treec7f894b53202bb698927246934dbc675abd69159 /libjava/jvmti.cc
parent0760e423a881a3f68b6918d2834a9c91951c30b5 (diff)
downloadgcc-3012256a4ae4c12091124a3d24cb152a376fac8b.tar.gz
* jvmti.cc (_Jv_JVMTI_GetStackTrace): Remove cast
from jthread to Thread *; it is no longer needed. (_Jv_JVMTI_GetFrameCount): Likewise. Fix small formatting typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121878 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/jvmti.cc')
-rw-r--r--libjava/jvmti.cc18
1 files changed, 7 insertions, 11 deletions
diff --git a/libjava/jvmti.cc b/libjava/jvmti.cc
index 815bee54aca..37e6727f6ad 100644
--- a/libjava/jvmti.cc
+++ b/libjava/jvmti.cc
@@ -256,7 +256,7 @@ _Jv_JVMTI_GetAllThreads(MAYBE_UNUSED jvmtiEnv *env, jint *thread_cnt,
static jvmtiError JNICALL
_Jv_JVMTI_GetFrameCount (MAYBE_UNUSED jvmtiEnv *env, jthread thread,
- jint* frame_count)
+ jint *frame_count)
{
REQUIRE_PHASE (env, JVMTI_PHASE_LIVE);
@@ -265,12 +265,10 @@ _Jv_JVMTI_GetFrameCount (MAYBE_UNUSED jvmtiEnv *env, jthread thread,
using namespace java::lang;
THREAD_DEFAULT_TO_CURRENT (thread);
-
- Thread *thr = reinterpret_cast<Thread *> (thread);
- THREAD_CHECK_VALID (thr);
- THREAD_CHECK_IS_ALIVE (thr);
+ THREAD_CHECK_VALID (thread);
+ THREAD_CHECK_IS_ALIVE (thread);
- _Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thr->frame);
+ _Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thread->frame);
(*frame_count) = frame->depth ();
return JVMTI_ERROR_NONE;
}
@@ -826,10 +824,8 @@ _Jv_JVMTI_GetStackTrace (MAYBE_UNUSED jvmtiEnv *env, jthread thread,
using namespace java::lang;
THREAD_DEFAULT_TO_CURRENT (thread);
-
- Thread *thr = reinterpret_cast<Thread *> (thread);
- THREAD_CHECK_VALID (thr);
- THREAD_CHECK_IS_ALIVE (thr);
+ THREAD_CHECK_VALID (thread);
+ THREAD_CHECK_IS_ALIVE (thread);
jvmtiError jerr = env->GetFrameCount (thread, frame_count);
if (jerr != JVMTI_ERROR_NONE)
@@ -843,7 +839,7 @@ _Jv_JVMTI_GetStackTrace (MAYBE_UNUSED jvmtiEnv *env, jthread thread,
ILLEGAL_ARGUMENT (start_depth >= (*frame_count));
ILLEGAL_ARGUMENT (start_depth < (-(*frame_count)));
- _Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thr->frame);
+ _Jv_Frame *frame = reinterpret_cast<_Jv_Frame *> (thread->frame);
// If start_depth is negative use this to determine at what depth to start
// the trace by adding it to the length of the call stack. This allows the