jvmti.cc (_Jv_JVMTI_GetStackTrace): Remove cast from jthread to Thread *; it is no...
authorKeith Seitz <keiths@redhat.com>
Tue, 13 Feb 2007 02:44:51 +0000 (02:44 +0000)
committerKeith Seitz <kseitz@gcc.gnu.org>
Tue, 13 Feb 2007 02:44:51 +0000 (02:44 +0000)
        * jvmti.cc (_Jv_JVMTI_GetStackTrace): Remove cast
        from jthread to Thread *; it is no longer needed.
        (_Jv_JVMTI_GetFrameCount): Likewise.
        Fix small formatting typo.

From-SVN: r121878

libjava/ChangeLog
libjava/jvmti.cc

index b76d6e7c21463f115d9fcaf7868a046078dfd929..340d74c39c2fa2f572de5f71c0d789ed998dab97 100644 (file)
@@ -1,3 +1,10 @@
+2007-02-12  Keith Seitz  <keiths@redhat.com>
+
+       * jvmti.cc (_Jv_JVMTI_GetStackTrace): Remove cast
+       from jthread to Thread *; it is no longer needed.
+       (_Jv_JVMTI_GetFrameCount): Likewise.
+       Fix small formatting typo.
+
 2007-02-12  Tom Tromey  <tromey@redhat.com>
 
        * sources.am, Makefile.in: Rebuilt.
index 815bee54acacfc3558fb604d08c96e78d1b7c67f..37e6727f6adc9b9ae3fa41555dba74877f153d7e 100644 (file)
@@ -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,
-                         jintframe_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