Shree
Shree

Reputation: 848

Java debugging with byte codes

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.

Upvotes: 8

Views: 1549

Answers (2)

lscoughlin
lscoughlin

Reputation: 2416

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.

Upvotes: 2

Eugene Kuleshov
Eugene Kuleshov

Reputation: 31795

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.

Upvotes: 0

Related Questions