0

如何查看gdb中第一个操作数地址的数据?

cmp [ebp+eax], edi

我尝试使用:

print /d $ebp
print /d $eax

并手动添加值以创建地址,但不确定下一步该做什么,或者是否有更简单的方法......

4

1 回答 1

1
(gdb) help x
Examine memory: x/FMT ADDRESS.
ADDRESS is an expression for the memory address to examine.
FMT is a repeat count followed by a format letter and a size letter.
Format letters are o(octal), x(hex), d(decimal), u(unsigned decimal),
  t(binary), f(float), a(address), i(instruction), c(char) and s(string).
Size letters are b(byte), h(halfword), w(word), g(giant, 8 bytes).
The specified number of objects of the specified size are printed
according to the format.

对于您的示例:

x/d $ebp+$eax
于 2013-10-03T10:49:10.470 回答