Questions tagged [jdi]

The Java Debug Interface (JDI) is a high level Java API providing information useful for debuggers and similar systems needing access to the running state of a (usually remote) virtual machine.

The Java Debug Interface (JDI) is a high level Java API providing information useful for debuggers and similar systems needing access to the running state of a (usually remote) virtual machine. It provides information useful for debuggers and similar systems needing access to the running state of a (usually remote) virtual machine.

The JDI provides introspective access to a running virtual machine's state, Class, Array, Interface, and primitive types, and instances of those types.

The JDI also provides explicit control over a virtual machine's execution. The ability to suspend and resume threads, and to set breakpoints, watchpoints, ... Notification of exceptions, class loading, thread creation... The ability to inspect a suspended thread's state, local variables, stack backtrace...

JDI is the highest-layer of the Java Platform Debugger Architecture (JPDA). For more information on the Java Platform Debugger Architecture, see the Java Platform Debugger Architecture documentation for this release and the Java Platform Debugger Architecture website.

107 questions
0
votes
0 answers

can Instrumentation.redefineClasses trigger VirtualMachine.redefineClasses?

If a class has been redefined by Instrumentation.redefineClasses, is there a way to trigger the referenceType be redefined by VirtualMachine.redefineClasses?
nzomkxia
  • 1,219
  • 4
  • 16
  • 35
0
votes
1 answer

Can I upload tools.jar on Maven Central?

My application uses the JDI debugger classes, which are in tools.jar. I want the application to be packaged as standalone using Maven (ie creating a foo-with-dependencies.jar). However, tools.jar is not on Maven Central. Popular solution on Stack…
Martin Monperrus
  • 1,845
  • 2
  • 19
  • 28
0
votes
0 answers

Source code through JDI

I'm tying to programmatically debugging Nashorn engine using Java debug interface. I'm get jdk.nashorn.internal.scripts.Script$Recompilation$1$23A$\^eval\_ stack frame and can view source locations in this frame. But I want to load executing…
0
votes
1 answer

How can I peek at the stack and registers

I would like to step through an executing Java method and view the local program stack and registers. For example if a PUSH instruction is executed, I want to see the value on the top of the stack, the stack depth, the values under that one, etc. Is…
Victor Grazi
  • 15,563
  • 14
  • 61
  • 94
0
votes
0 answers

Java VM hang after VMStartEvent

vm = launchTarget("com.sun.tools.example.trace.Hello", false); EventQueue eventQ = vm.eventQueue(); boolean connected = true; while (connected) { try { EventSet eventSet = queue.remove(); EventIterator it =…
Santhosh
  • 11
  • 4
0
votes
1 answer

Manually load classes using Java Debug Interface

Background I am creating a tool that will turn Java code into a UML Class Diagram. As I only have 3 weeks to do it, my teacher suggested I use the Java Debug Interface rather than creating a parser to do this task. Problem I have registered for the…
crazyloonybin
  • 935
  • 3
  • 18
  • 36
0
votes
2 answers

JDI VMDisconnectedException

I am writing a debugger for a Java application using JDI. I run the debugee process using: '/usr/lib/jvm/jdk-8-oracle-x64/bin/java -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y -cp (...) program.entrypoint.Test' It's a very…
oskarm
  • 123
  • 3
  • 8
0
votes
2 answers

Life-span of JDI mirrors of objects living in a remote JVM

I've been writing a Java client which uses JDI to create and modify objects in a remote JVM (by connecting to a JDWP agent-based server running in the remote JVM). One of the requirements of my project is that I can't suspend all of the threads in…
0xbe5077ed
  • 4,565
  • 6
  • 35
  • 77
0
votes
1 answer

unsatisfied link error in android native call

I am trying to call a native function from an android activity class, which results in a unsatisfied link error. Here is the activity. package com.example.rockboos; import android.os.Bundle; import android.app.Activity; import…
Luke
  • 1,768
  • 2
  • 20
  • 30
0
votes
1 answer

Java JDI CommandLineLaunch Not Loading Desired Class

I'm currently learning Java's JDI and I'm trying to launch a Virtual Machine that is running my desired program and establish a connection to the launched VM which is running the desired program. In order to this, I am using a Launching connector…
MathanMV
  • 412
  • 1
  • 5
  • 16
0
votes
2 answers

JDI - ObjectReference.setValue() on an inherited field

I am using the JDI to debug a program. I am trying to change the value of a field in a certain ObjectReference. I have the Field object, as I can find it through ObjectReference.referencetype().allFields() However, I cannot modify that field…
Dean Leitersdorf
  • 1,303
  • 1
  • 11
  • 22
0
votes
1 answer

InvalidStackFrameException After Calling Method via ObjectReference#invokeMethod

I am currently working on an Eclipse plugin which enhances the debugging possibilities. During the debugging session, I invoke a Scala method via com.sun.jdi.ObjectReference#invokeMethod like that: public int callMethod_Reactive_Level(final…
Simon
  • 4,103
  • 7
  • 28
  • 53
0
votes
1 answer

JPDA JDI ObjectReference of java.io.InputStreamReader

is there a way to retrieve String/Text from JPDA JDI ObjectReference of java.io.InputStreamReader ?
hiddenuser
  • 525
  • 2
  • 7
  • 19
0
votes
2 answers

how to record/monitor java field assignment operation

how to record/monitor java field assignment operation ; for example , i want to add some function before or after the assignment operation; original code : class Test{ public String name; public void operation{ .... some code ... …
0
votes
1 answer

Custom debugger to debug remote/local java application

I want to debug a remote java application using a java program(i don't mind using eclipse api in the program) but i don't want to debug it using eclipse GUI. Any suggestion/help will be greatly appreciated. Thanks in advance!!
user1722639
  • 1
  • 1
  • 1
  • 1