Vdaka za clanok.
Velmi dobra vec pri breakpointoch je moznost sputenia preddefinovanych prikazov ak bol breakpoint hitnuty (pripadne dat breakpointu podmienku). Tj. napriklad vypise comment, pripadne cez display zobrazi obsah registra apod.
(gdb) disass $pc, $pc+8
Dump of assembler code from 0x8048074 to 0x804807c:
=> 0x08048074: pop eax
0x08048075: pop edx
0x08048076: mov edx,DWORD PTR [edx]
0x08048078: sub esp,0x1000
End of assembler dump.
(gdb)
(gdb) b *0x08048078
Breakpoint 2 at 0x8048078
(gdb)
(gdb) command
Type commands for breakpoint(s) 2, one per line.
End with a line saying just "end".
>print "about to mess up the stack"
>end
(gdb)
(gdb) c
Continuing.
Breakpoint 2, 0x08048078 in ?? ()
=> 0x08048078: 81 ec 00 10 00 00 sub esp,0x1000
$1 = "about to mess up the stack"
(gdb)