# contains some utility functions for gdb # and more specificly for running gdb inside emacs (gud) # this is used by emacs gud-mode to complete a line : if-leave postpone if postpone leave postpone then ; immediate : if-discard postpone if postpone drop postpone leave postpone then ; immediate : lpop >r rsp pop r> swap ; # ( list -- singleton ) : print-all-except-last size 1 = if-leave lpop . " " . # todo: save this in string. need string streams. pass print-all-except-last ; : complete slurp print-all-except-last unpack "symbol to complete: " . . .n ; # get rest of line : .debug "debug: " . . dup . .n ; "( item string -- item )\tPrint string followed by item and a newline, leave item untouched."