2013-03-08 35 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字節)。

相關問題