Hotspot7 hsdis PrintAssembly 英特尔语法
每次我在 Hotspot 中使用 -XX:+PrintAssembly
并且必须阅读可怕的 AT&T 语法时,这都会让我很烦恼。
有没有办法告诉它使用英特尔语法?
It annoys me every time I use -XX:+PrintAssembly
with Hotspot and have to read the horrible AT&T syntax.
Is there a way to tell it to use the Intel syntax?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您所需要做的就是将一些选项解析到 dis-asm.h 和 binutils 代码中
对于 intel Asm(我也更喜欢),只需添加以下
-XX:PrintAssemblyOptions=intel
如果您需要组合选项像这样使用逗号
-XX:PrintAssemblyOptions=intel,hsdis-help
任何不被识别为 hsdis 选项的内容都将被提供给反汇编程序,这些选项是相同的您看到的列表来自
All you need is to parse some options onto the dis-asm.h and binutils code
For intel Asm (which I also prefer) just add the following
-XX:PrintAssemblyOptions=intel
If you need to combine options do it with commas like so
-XX:PrintAssemblyOptions=intel,hsdis-help
Anything not recognised as a hsdis option will be fed to the disassembler, these options are the same ones you see listed from
我认为没有任何现有的方法可以做到这一点。但这是我发现的——
这里是源代码
hsdis
。您可以通过将-masm=intel
传递给 GCC 来更改Makefile
。如果有效,从现在开始,+PrintAssembly
应该开始输出 Intel 语法汇编。这是获取源代码、构建和最终的分步过程获取
hsdis-arch.so
,它是进行反汇编工作的!我自己还没有尝试过这个。我希望你能做到这一点:)
如果没有任何效果,这应该会让你对 AT&T 语法 :)
I don't think there's any existent way to do this. But this is what I've found-
Here is the source of
hsdis
. You can change theMakefile
by passing-masm=intel
to GCC. And if it works, from now onwards,+PrintAssembly
should start outputting Intel syntax assembly.Here is the step by step procedure to get the source, build and finally get the
hsdis-arch.so
which is the one which does the disassembly work!I haven't tried this out myself. I wish you get this to work :)
If nothing works, this should make you comfortable with AT&T Syntax :)