Assembly 什么';在gdb(Linux)中,x/s输出的含义是什么?
我正在用gdb调试一个C程序Assembly 什么';在gdb(Linux)中,x/s输出的含义是什么?,assembly,gdb,Assembly,Gdb,我正在用gdb调试一个C程序 (gdb) r prog_name (gdb) break main (gdb) x/wx $esp (gdb) 0xbffff3d0: 0xbffff60d 我知道前3个命令的含义 我不明白的是最后一个的含义(第三个命令后gdb的输出)。 具体来说,我不明白:$esp是一个寄存器,因此我希望在寄存器中找到一个值,就我所知,寄存器没有地址。 那么,假设0xbffff60d是寄存器esp包含的值,那么**0xbffff3d0**是什么 提前感谢直接来自gdb
(gdb) r prog_name
(gdb) break main
(gdb) x/wx $esp
(gdb) 0xbffff3d0: 0xbffff60d
我知道前3个命令的含义
我不明白的是最后一个的含义(第三个命令后gdb的输出)。
具体来说,我不明白:$esp是一个寄存器,因此我希望在寄存器中找到一个值,就我所知,寄存器没有地址。
那么,假设0xbffff60d是寄存器esp包含的值,那么**0xbffff3d0**是什么
提前感谢直接来自gdb:
(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),
T(OSType), A(floating point values in hex).
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.
因此,在您的例子中,
$esp
包含0xbfff3d0
,如果您将该值解释为指针并取消引用,您将直接从gdb
得到*(uint32_t*)0xbfff3d0
是0xbfff60d:
(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),
T(OSType), A(floating point values in hex).
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.
因此,在您的例子中,$esp
包含0xbfff3d0
,如果您将该值解释为指针并取消引用,您将直接从gdb
得到*(uint32_t*)0xbfff3d0
是0xbfff60d:
(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),
T(OSType), A(floating point values in hex).
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.
因此,在您的例子中,$esp
包含0xbfff3d0
,如果您将该值解释为指针并取消引用,您将直接从gdb
得到*(uint32_t*)0xbfff3d0
是0xbfff60d:
(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),
T(OSType), A(floating point values in hex).
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.
因此,在您的例子中,$esp
包含0xbfff3d0
,如果您将该值解释为指针并取消引用,您将得到*(uint32_t*)0xbfff3d0
是0xbfff60d
您是否尝试过帮助x
?我没有。我现在就做了。但是我没有看到任何输出解释。您是否尝试过帮助x
?我没有。我现在就做了。但是我没有看到任何输出解释。您是否尝试过帮助x
?我没有。我现在就做了。但是我没有看到任何输出解释。您是否尝试过帮助x
?我没有。我现在就做了。但我没有看到任何输出解释Excuse。“and*(uint32_t*)0xbffff3d0是0xbffff60d”是什么意思?我的意思是,如果将0xbffff3d0
解释为指针,它指向的值是0xbffff60d
。我只是用C语法作为速记。对不起。“and*(uint32_t*)0xbffff3d0是0xbffff60d”是什么意思?我的意思是,如果将0xbffff3d0
解释为指针,它指向的值是0xbffff60d
。我只是用C语法作为速记。对不起。“and*(uint32_t*)0xbffff3d0是0xbffff60d”是什么意思?我的意思是,如果将0xbffff3d0
解释为指针,它指向的值是0xbffff60d
。我只是用C语法作为速记。对不起。“and*(uint32_t*)0xbffff3d0是0xbffff60d”是什么意思?我的意思是,如果将0xbffff3d0
解释为指针,它指向的值是0xbffff60d
。我只是用C语法作为速记。