gdb - Examine

gdb - Examine

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

  • o - Display in octal.
  • x - Display in hexadecimal.
  • u - Display in unsigned, standard base-10 decimal.
  • t - Display in binary.
  • f - Display in float
  • a - address
  • i - instruction
  • c - char
  • s - string
  • b - A single byte
  • h - A halfword, which is two bytes in size
  • w - A word, which is four bytes in size
  • g - A giant, which is eight bytes in size

(gdb) x/s $eip
0x8048415 <main+9>:      "\307D$\034"
(gdb) x/o main
0x804840c <main>:       0125
(gdb) x/x main
0x804840c <main>:       0x55
(gdb) x/u main
0x804840c <main>:       85
(gdb) x/t main
0x804840c <main>:       01010101
(gdb) x/b
0x804840d <main+1>:     10001001
(gdb) x/h
0x804840e <main+2>:     1000001111100101
(gdb) x/w
0x8048410 <main+4>:     11101100100000111111000011100100
(gdb) x/g
0x8048414 <main+8>:     0000000000000000000000000001110000100100010001001100011100100000
(gdb) x/x
0x804841c <main+16>:    0x84d02404c711eb00
(gdb) x/b
0x8048424 <main+24>:    0x04
(gdb) x/h
0x8048425 <main+25>:    0xe808
(gdb) x/w

[1]: GNU GDB Debugger Command Cheat Sheet

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值