是否可以在特定的字节码指令中设置断点? [英] Is it possible to set breakpoints at a specific bytecode instruction?
问题描述
我使用jdb来远程调试我没有源代码的Java应用程序。此外,应用程序jar被模糊化。
I'm using jdb to remotely debug a Java application of which I don't have the source code. Furthermore, the application jars are obfuscated.
我可以设置方法断点,但是是否可以在方法中的特定字节码指令中设置断点?我的想法是使用像javap这样的反汇编程序来识别有趣的指令。
I can set method breakpoints but, is it possible to set breakpoints at a specific bytecode instruction within a method? The idea I have is to use some disassembler like javap to identify the interesting instructions.
jdb或其他Java调试器可以执行此操作吗?
Can jdb or other Java debugger do this?
推荐答案
你需要行号来断点(我假设已经被删除了)。您可以使用仪器人工地在文件中添加行号,如果需要,您可以在每个指令中断点。
You need line numbers to breakpoint on (something I assume has been removed). You can artificially add line numbers to the file using instrumentation and you will be able to breakpoint at every instruction if you wish.
这篇关于是否可以在特定的字节码指令中设置断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!