与 AT&T 相比,英特尔汇编语法的局限性 [英] Limitations of Intel Assembly Syntax Compared to AT&T

查看:31
本文介绍了与 AT&T 相比,英特尔汇编语法的局限性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对我来说,英特尔语法更容易阅读.如果我只专注于 Intel 语法在组装森林中游荡,我会错过什么吗?我有什么理由想切换到 AT&T(除了能够阅读其他人的 AT&T 程序集)?我的第一个线索是 gdb 默认使用 AT&T.

如果这很重要,我的重点只放在任何可能与 Linux/BSD 和 C 语言相关的程序集和语法上.

解决方案

两者之间确实没有任何优势.我同意 Intel 语法 更容易阅读.请记住,AFAIK,所有 GNU 工具都可以选择使用 Intel 语法.

看起来您可以通过以下方式让 GDB 使用 Intel 语法:

<前>设置拆机味intel

GCC 可以使用 -masm=intel 执行 Intel 语法.

To me, Intel syntax is much easier to read. If I go traipsing through assembly forest concentrating only on Intel syntax, will I miss anything? Is there any reason I would want to switch to AT&T (outside of being able to read others' AT&T assembly)? My first clue is that gdb uses AT&T by default.

If this matters, my focus is only on any relation assembly and syntax may have to Linux/BSD and the C language.

解决方案

There is really no advantage to one over the other. I agree though that Intel syntax is much easier to read. Keep in mind that, AFAIK, all GNU tools have the option to use Intel syntax also.

It looks like you can make GDB use Intel syntax with this:

set disassembly-flavor intel

GCC can do Intel syntax with -masm=intel.

这篇关于与 AT&T 相比,英特尔汇编语法的局限性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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