Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个断点,它附加了一些逻辑,如果它所在的方法是从 JDI 调用的,我想跳过这些逻辑。
即在客户端jvm中
foo.barr();
应该导致与断点关联的代码运行但
fooReference.invoke(thread,barrMethod,params,0);
在调试器 jvm 中应该会导致逻辑被跳过并恢复代码。
我有两个问题:
jdi 方法调用如何出现在客户端 JVM 的 java 调用堆栈上?
如果无法使用调用堆栈检测调用,是否可以使用另一种方法?