Fetch a halted machine off a board
A program that faults on a board running InnerMachineUDP halts, and the
board parks the machine as it was at the fault: its stack, its names,
what it was about to do. From hosts/unix.o.se, ask for it over TCP and
write it to a file:
tools/machine-get.sh <the board's address> parked.osc
The shell substitutes the address, the port (8889) and the path; what
runs is the command line’s own instructions — connect, send
/machine/get, receive one frame, write the element. python3
tools/get_machine.py <address> parked.osc in hosts/mcu.o.se does the
same with nothing but Python.
At the prompt the file opens as a value, and the machine verbs take it from there:
/f : "parked.osc" /read
/m : (/f, 1) /o/nth
(/m) /o/db
/o/db shows the whole machine at once; /o/backtrace says what each
open frame had left to do; (/m, 5) /o/machine/use/value continues it
with a value in place of the name it could not find, and
/o/machine/store/value binds the name as well. Each answers a new
machine and leaves the one that arrived as it was.
A machine with the fix in it goes back the way it came, and lands in the board’s inner machine to carry on:
(/m, "fixed.osc") /write/elem
tools/machine-put.sh <the board's address> fixed.osc