More gdb tricks $ gdb bomblab_warmup (gdb) start (gdb) info functions (gdb) disas main (gdb) disas thing1 (gdb) disas thing2 (gdb) disas f Print output from a function (and execute it!) : (If you can figure out its return and args.) (gdb) print (int) f(10) Print data at an address (using mostly C notation) (Here the "int*" says to trat this as a pointer to an int, and the first * follow that pointer ... thus printing it as an int.) (gdb) print *(int*)(0x08048403) Print value of a register. (gdb) print $esp Or follow the pointer and print what's there. (gdb) print *$esp Set data at memory locations (mostly C notation) (gdb) set *(int*)0x08048403 = 0x1 # change 4 bytes (gdb) set *(char*)0x08048403 = 'a' # change 1 byte (gdb) set *$esp = 1234 # change 4 bytes on stack