2013-03-08 34 views
1

我GDB输出堆栈看起来像这样GDB堆栈输出没有显示完整的十六进制地址?

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

我想它看起来更像这

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

有一个选项?我在这里错过了一些微不足道的东西吗?

+0

试试'x/4xw $ esp'也许? – Kludas 2013-03-08 04:57:30

+0

你能提供更多的信息 - 什么命令,什么操作系统等? – 2013-03-08 10:06:59

回答

1

你确实想(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字节)。

相关问题