在OSX10.6上反汇编为x86_64(但使用_Intel_语法) [英] Disassemble into x86_64 on OSX10.6 (But with _Intel_ Syntax)

查看:107
本文介绍了在OSX10.6上反汇编为x86_64(但使用_Intel_语法)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道otool -tv,但是我宁愿使用 Intel 语法而不是AT& T,主要是为了轻松地读一本书,而不必研究成千上万的$.

I know of otool -tv, but I would much rather use the Intel syntax rather than AT&Ts, mainly to easily follow along in a book and not have to look over thousands of %'s and $'s.

我也很感谢在哪里可以找到gdb的配置文件的任何提示.

I'd also appreciate any tips to where I might find gdb's config file.

我忘记了:我正在运行64位处理器,但是想知道是否也可以将其分解为32位程序集?不仅如此,OSX的gdblist命令与标准的GNU版本是否有不同的工作方式?

I forgot: I'm running a 64bit processor, but was wondering if it would be possible to also disassemble into 32 bit assembly? Not only that, but does OSX's gdb's list command work differently than the standard GNU version?

非常感谢!

(此外,如果您有任何想法,我可能会在C-> MIPS上找到一些反汇编程序,那将非常有趣.但这不是必需的!)

(Also, if you have any idea where I might find a little disassembler from C -> MIPS, that'd be very fun to play with. But not necessary!)

推荐答案

要回答第二个问题,如果代码已编译为64位和32位的胖二进制文件,则可以使用otool -arch i386 -tv拆解二进制文件的32位分片; otool -arch x86_64 -tv将为您提供64位部分(在SnowLeopard上,如果未传递-arch标志,这也是默认行为).

To answer your second question, if the code has been compiled into a fat binary with both 64-bit and 32-bit, you can use otool -arch i386 -tv to disassemble the 32-bit slice of the binary; otool -arch x86_64 -tv will give you the 64-bit portion (on SnowLeopard, this is also the default behavior if no -arch flag is passed).

还请注意,尽管otool不支持Intel语法,但gdb(set disassembly-flavor intel)和XCode(首选项->调试->反汇编样式)都支持.

Also note that while otool doesn't support the Intel syntax, gdb (set disassembly-flavor intel) and XCode (Preferences -> Debugging -> Disassembly Style) do.

这篇关于在OSX10.6上反汇编为x86_64(但使用_Intel_语法)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆