1

When invoking a method on an com.sun.jdi.ObjectReference instance, you have to provide some options: either INVOKE_SINGLE_THREADED, or INVOKE_NONVIRTUAL.

invokeMethod​(ThreadReference thread, Method method, List<? extends Value> arguments, int options)

According to the Javadoc:

INVOKE_SINGLE_THREADED: Perform method invocation with only the invoking thread resumed
INVOKE_NONVIRTUAL: Perform non-virtual method invocation

But I am still confused what these options mean.

Nfff3
  • 321
  • 8
  • 24
  • 1
    These two flags are not connected at all. You could specify both together when it fits. So “what is the difference between them” is not a meaningful question. – Holger Aug 18 '20 at 15:32
  • @Holger, got it, but I still don't know what they do – Nfff3 Aug 18 '20 at 16:38
  • 2
    `INVOKE_SINGLE_THREADED`: resume only the invoking thread (rather than all JVM threads). `INVOKE_NONVIRTUAL`: invoke the specified declared method, ignoring overriding methods (rather than using the standard method lookup). – Holger Aug 19 '20 at 06:56

0 Answers0