1、安装gdb-peda
$ git clone https://github.com/longld/peda.git ~/peda
$ echo "source ~/peda/peda.py" >> ~/.gdbinit
gdb-peda$ disass vulnerable_function
Dump of assembler code for function vulnerable_function:
0x08048484 <+0>: push ebp
0x08048485 <+1>: mov ebp,esp
0x08048487 <+3>: sub esp,0x38
0x0804848a <+6>: sub esp,0x4
0x0804848d <+9>: push 0x100
0x08048492 <+14>: lea eax,[ebp-0x30]
0x08048495 <+17>: push eax
0x08048496 <+18>: push 0x0
0x08048498 <+20>: call 0x8048320 <read@plt>
0x0804849d <+25>: add esp,0x10
0x080484a0 <+28>: nop
0x080484a1 <+29>: leave
0x080484a2 <+30>: ret
End of assembler dump.
gdb-peda$ b *0x08048484
Breakpoint 1 at 0x8048484