colorful rat Ratfactor.com > Dave's Repos

nasmjf

A NASM assembler port of JONESFORTH
git clone http://ratfactor.com/repos/nasmjf/nasmjf.git

nasmjf/gdb.script

Download raw file: gdb.script

1 # gdb script for nasmjf debugging 2 3 #tui enable 4 5 break _start 6 #break _KEY 7 8 # run will stop at first breakpoint 9 run 10 11 # if we don't step, it seems we can't display registers and such because 12 # the program really hasn't started... 13 step 14 15 # set asm flavor to intel to match NASM 16 set disassembly-flavor intel 17 18 # show disassembly of next line (in addition to source assembly) each step 19 #set disassemble-next-line on 20 21 # we don't need to be asked about a bunch of stuff 22 set confirm off 23 24 25 # Setup register and var auto-displays (shown after every step) 26 # esi - next forth word address to execute 27 # ebp - return stack for forth word addresses 28 # esp - "normal" stack for params 29 30 #display/x $eax 31 #display/x $ebx 32 #display/x $ecx 33 #display/x (int)bufftop 34 #display/x (int)buffer 35 #display/x (int)currkey 36 #display/x $esi 37 #display/x $ebp 38 #display/x $esp 39 # Need to cast the value (a 32bit address) at Forth var S0 40 #display/x (int)var_S0 41 42 define jfreg 43 print "Next forth word to exec:" 44 print $esi 45 end