8

I would like to know if there is any IDE or Eclipse Plugin that supports mixed mode debugging. As I searched the term mixed mode, found lot of references debugging VM languages alongside with native code.

But I referring to a feature that is similar to the one available in compiled languages such as C where an user can see both C source line along side with the corresponding assembly line and will be able to step in even at assembly level. (please excuse If I had made a nomenclature mistake by calling the feature as mixed mode)

In other words I am looking for a following features while debugging java:

  1. Ability to the java source code and the corresponding byte codes during program execution
  2. Ability to see JVM PC registers and Operand stacks
  3. Ability to view other JVM specific data structures (for example constant pools)

This is to understand how the Java source code maps to byte codes and how the various JVM associated data structures are affected while stepping in.

3
  • You don't need a debugger to understand how Java source code maps to byte code. Just use javap. Commented Mar 2, 2013 at 19:00
  • Good question! With either gdb or MSVS debuggers you can debug at the assembly level as well as at the high-level language level. I'd be curious if there was any way to do something similar from a Java IDE. Here are a few suggestions: How to debug compiled Java in Eclipse, and Is there a debugger/disassembler for Java? Commented Mar 2, 2013 at 19:07
  • It's not just a matter of IDEs and plugins. Such a feature would require intimate support from the JVM itself. I suppose an alternative is to use a custom JVM implementation. Commented Mar 2, 2013 at 19:13

2 Answers 2

2

I'm a DSL developer and have sort of run into this same issue a number of times.

The only tool i've found has been the Dr. Garbage tools.

At the current moment, they don't seem to be the best maintained, but they do work with appropriate versions of eclipse.

Sign up to request clarification or add additional context in comments.

Comments

0

You don't need debugger to understand how Java code maps to compiled native code. You can use -XX:+PrintCompilation JVM flag. See mode info on that in Stephen Colebourne's blog post and more detail in Kris Mok reply to that post.

You may also find HotSpot Internals Wiki useful.

2 Comments

I believe the OP wants to debug at the level of bytecode, not native code.
I read OP wanted to understand how the Java source code maps to byte codes and how the various JVM associated data structures are affected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.