java java反编译器在实际物理位置保存行号
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5831745/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
java decompiler with save line numbers in actual physical position
提问by popalka
Many IDE's debugger match the physical line number. I'm looking for java decompiler with saving actual line number in decompiling code.
许多 IDE 的调试器匹配物理行号。我正在寻找在反编译代码中保存实际行号的 java 反编译器。
http://java.decompiler.free.fr/is not one.
回答by mchr
I have released a companion plugin to JD Eclipse which fixes the line numbers issue and makes it easier to switch between real and decompiled source: http://mchr3k-coding.blogspot.co.uk/2012/07/realignment-for-jd-eclipse.html
我已经发布了 JD Eclipse 的配套插件,它修复了行号问题,并且可以更轻松地在真实和反编译源之间切换:http: //mchr3k-coding.blogspot.co.uk/2012/07/realignment-for-jd -eclipse.html
回答by esandrei
I actually added an "Align code for debugging" feature to JD-Eclipse. I've been using it for the last year.
我实际上向 JD-Eclipse 添加了“对齐调试代码”功能。我去年一直在使用它。
If anyone wants to give it a try until Emmanuel Dupuy releases his own version, you can get it from here. More details inside README.txt
如果有人想在 Emmanuel Dupuy 发布自己的版本之前尝试一下,您可以从这里获取。README.txt 中的更多详细信息
回答by WhiteFang34
I've tried all of the decompilers I'm aware of for Eclipse and I've yet to see one that lines up the original line numbers with the source it shows. The JD-Eclipse plugin you referenced comes the closest with comments for the original line numbers. It's too bad it doesn't munge the generated source to line them up. Generally the best thing to do is track down the original source to attach to Eclipse. Otherwise you just have to hunt for the line number in the comments with JD-Eclipse.
我已经尝试了所有我知道的 Eclipse 反编译器,但我还没有看到将原始行号与其显示的源代码对齐的反编译器。您引用的 JD-Eclipse 插件最接近原始行号的注释。太糟糕了,它没有修改生成的源来排列它们。通常最好的办法是追踪原始源以附加到 Eclipse。否则,您只需要在 JD-Eclipse 的注释中寻找行号。
回答by user967710
You might want to look at this, as well:
你可能还想看看这个:
https://github.com/shimonmagal/jdgui-source-line-fixer
https://github.com/shimonmagal/jdgui-source-line-fixer
It takes in the zip from jd-gui and outputs a different zip, with line numbers fixed.
它从 jd-gui 获取 zip 并输出一个不同的 zip,行号是固定的。
Not the most convenient maybe, but does the job.
也许不是最方便的,但可以完成工作。