how to debug jvm.dll or java process in gdb , like we debug any other executable?
Normally when we want to create Executable with debug symbols, We use gcc -g exmaple.c -o exmaple, So is there any JVM is avialable, So we can debug JVM at runtime?
-
1Why would you want to do that? (that is, unless you're writing your own JVM) You will not debug any java code this way, only the native instructions executed by the JVM binary.npe– npe2012-08-13 11:49:16 +00:00Commented Aug 13, 2012 at 11:49
-
Do you want to debug the JVM or do you want to debug your Java program?maba– maba2012-08-13 11:49:29 +00:00Commented Aug 13, 2012 at 11:49
-
maybe he/she wants to debug his JNI code? Also if it's just your java code you want to debug, use a java debugger (integrated in eclipse and netbeans)John Smith– John Smith2012-08-13 11:51:08 +00:00Commented Aug 13, 2012 at 11:51
-
http://stackoverflow.com/questions/2762916/how-to-use-eclipse-to-debug-jni-code-java-c-cJohn Smith– John Smith2012-08-13 11:56:24 +00:00Commented Aug 13, 2012 at 11:56
-
No i want to debug JVM not any JNI...twid– twid2012-08-13 11:57:28 +00:00Commented Aug 13, 2012 at 11:57
Add a comment
|
1 Answer
If you really want to debug the JVM executable, I suggest starting with OpenJDK.
Get the source code, build it from scratch (adding any debug flags you want), and then debug.