natThread.cc (dumpStack): Removed.
authorBryce McKinlay <bryce@gcc.gnu.org>
Tue, 15 Feb 2000 08:47:16 +0000 (08:47 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Tue, 15 Feb 2000 08:47:16 +0000 (08:47 +0000)
        * java/lang/natThread.cc (dumpStack): Removed.
        * java/lang/Thread.java (dumpStack): Implemented.

From-SVN: r31978

libjava/java/lang/Thread.java
libjava/java/lang/natThread.cc

index 7dbabcf56c51252f9fb12030a5c91f349e8e1f22..68dc24462cf4e3edf98345649e26c6bdf737c287 100644 (file)
@@ -49,7 +49,11 @@ public class Thread implements Runnable
   public native int countStackFrames ();
   public static native Thread currentThread ();
   public native void destroy ();
-  public static native void dumpStack ();
+  
+  public static void dumpStack ()
+  {
+    (new Exception ("Stack trace")).printStackTrace ();
+  }
 
   public static int enumerate (Thread[] threads)
   {
index 741f2b587e8ec3adfadce801c88e804ff3f744ca..6d052173dc66f6e4be97b7f43fd1d2a5180d9620 100644 (file)
@@ -122,15 +122,6 @@ java::lang::Thread::destroy (void)
   JvFail ("java::lang::Thread::destroy unimplemented");
 }
 
-void
-java::lang::Thread::dumpStack (void)
-{
-  // We don't implement this because it is very hard.  Once we have a
-  // VM, this could potentially ask the VM to do the dump in cases
-  // where it makes sense.
-  JvFail ("java::lang::Thread::dumpStack unimplemented");
-}
-
 void
 java::lang::Thread::interrupt (void)
 {