hakingff’ live:/ramdisk/home/haking
(gdb) list
1 void fn(char *a) {
2 char buf[10];
3 strcpy(buf, a);
A printfCthe end of fn\n");
5 }
6
7 main (int argc, char *argv[]) {
8 fn(argv[l]);
9 printfCthe end\n");
10 )
(gdb) break 3
Breakpoint 1 at 0x8048382: file stack_l.c, linę 3.
(gdb) run 000000000000000000000000000000
Starting program: /ramdisk/home/haking/stack_l 000000000000000000000000000000
Breakpoint 1, fn (a=0xbffffc2b '0' 3 strcpy(buf, a);
(gdb) print &buf
$1 = (char (•*) [ 101) 0xbffffa50
(gdb) print $ebp+4
$2 = (void *) 0xbffffa6c
(gdb) |
<repeats 30 times>) at stack_l.c:3
Cl