gpt4 book ai didi

c - GDB 堆栈输出未显示完整的十六进制地址?

转载 作者:太空宇宙 更新时间:2023-11-04 03:57:17 25 4
gpt4 key购买 nike

我的堆栈的 GDB 输出看起来像这样

0xffffd688:     0x98    0xd6    0xff    0xff    0x75    0x84    0x04    0x08

我希望它看起来像这样

0xbffff3b0: 0xbffff620 0xbffff3c9 0×00000006 0xbffff3d8

有选择吗?我在这里遗漏了一些微不足道的东西吗?

最佳答案

你确实想要 (gdb) x/4xw $sp:

(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.

在这种情况下,重复次数4格式字母x(十六进制)和大小字母w(字,4字节)。

关于c - GDB 堆栈输出未显示完整的十六进制地址?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15285723/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com