--- gdb notes --- I suggest getting the program to start running before trying to examine it. Here's a way to set a breakpointat the beginning and then get it loaded up and running ... but only to the first line. $ gdb bomblab_warmup (gdb) break main (gdb) start Then you can examine various things like (gdb) info reg show registers (gdb) info functions (long list; objdump is probably better) (gdb) disas main (or look in objdump) (gdb) disas thing1 (gdb) disas thing2 (gdb) disas f As well as look at memory with the many "x" (examine) commands, which show it in many different formats. x/ address repeat = how many, e.g. 16 or 32 format = x hex d decimal i instruction c character f float size = b byte ( 8 bits = 2 hex) w word (32 bits = 8 hex = 4 bytes) address = 0x8048420 or main or main+3 examples # Show 16 char bytes x/16cb 0x8048520 # Examine string at this location. x/s 0x8048520 # Show 16 hex bytes x/16xb 0x8048520 # Show 16 hex words x/16xw 0x8048520 # Show 16 address words x/16aw 0x8048520 # Show 16 decimal words x/16dw 0x8048520 # Show 16 instructions (whether they are or not) x/16iw 0x8048520 # Show as floating point x/16fw 0x8048520 stepping through the code (gdb) si stepi "step instruction" (gdb) finish continue until this function finishes (gdb) ni next "next instruction" ... if function call, procede until it exits (gdb) display/3i $pc # set automatic display of next 3 instructions 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 --- gdbtui ------- You can also run gdb in a split terminal window with the asssembly always displayed ... google for "gdbtui" documation. $ gdbtui warmup (gdb) break main (gdb) start (gdb) layout asm # assembly (gdb) layout reg # split assembly to show registers too (gdb) stepi # si for short; or "nexti" or "finish"