# ASM DEBUGGING # define special help command "h" that shows asm related commands only # define h echo -------\n echo asm debugging commands, see "help" for other gdb comands\n echo \ \n echo g exec & set temp break u disassemble from pc n times\n echo c run program (continue) uu disassemble from adr n times\n echo n step one instruction ss show stack n locations\n echo nn step but do not enter calls r show registers\n echo until step or run to end of loop db display bytes\n echo \ dw display words\n echo q quit gdb dd display dword\n echo \ ds display string\n echo bs show breaks \n echo bc clear breaks \n echo \n echo modifying the code within gdb requires reload, recompile easier? \n echo to change register -> set $eax = 0x123456 \n echo ------\n end # # set gdb initialization flags - change these as needed # # eliminate the pesky exit message that says program is running set confirm off set language asm # set disassembly-flavor intel # enable the following to work in hex, the default is decimal set output-radix 16 set input-radix 16 # # disable pesky hook messages?? this may not be necessary in other versions of gdb # define hook-stop end define hook-continue end #------------- define special commands for assembler ------------------- # # go (run) to temporary break location "g