3 PFX='0x[0-9a-f]* rrqforth.asm:[0-9]*[ ]*'
6 grep "${PFX}do" rrqforth.map | sed 's/ .*//;s/^/break */' > gdbinit
11 while [ $I -lt $NBR ] ; do echo disable $I ; I=$((I+1)) ; done >> gdbinit
13 RET=$(grep -w ret rrqforth.map | sed 's/ .*//')
14 echo "break *$RET" >> gdbinit
15 # ;; rax = cfa of called word
16 # ;; rsi = cell* of next forth word
17 # ;; [$rsp] = from where the call was
22 print (((char*)(*(((void**)\$rax)-2)))+32)
28 DS="$(grep "${PFX}DS_TOP:" rrqforth.map | sed 's/ .*//')"
29 RS="$(grep "${PFX}RS_TOP:" rrqforth.map | sed 's/ .*//')"
31 display *(void**)\$rsp@(((void*)$DS-\$rsp)/8)+1
32 display *(void**)\$rbp@(((void*)$RS-\$rbp)/8)+1
39 python gdb.execute("shell ./grepline.sh rrqforth.map " + str(gdb.parse_and_eval("\$pc")))
44 python gdb.execute("shell ./grepline.sh rrqforth.map \$arg0" + " 1 " )
46 python gdb.execute("shell ./grepline.sh rrqforth.map \$arg0" + " 1 " + "\$arg1" )
51 exec gdb -x gdbinit rrqforth