简体   繁体   中英

Translating cmp in assembly

I'm new to assembly and ran accross the following ling:

cmp 0x2c(%esp),%esi

It's clearly trying to compare, but I don't know what 0x2c(%esp) is. I'm using GDB, so a command to access that value would be helpful. The next line sees if the two values are equal.

我不熟悉您的汇编器的语法,但我收集到的结果是将寄存器ESI的内容与(堆栈指针+ 2C十六进制)内存位置的内容进行比较

This is at&t syntax. You can switch gdb to intel syntax using set disassembly-flavor intel to get more readable code. You can examine the value using for example x/d $esp+0x2c .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM