debugging interpreters with blinkenlights

58 katselukertaa
Siirry ensimmäiseen lukemattomaan viestiin

R Z

lukematon,
9.5.2021 klo 10.42.249.5.2021
vastaanottaja blinkenlights
Hello Justine,

First of all, I just want to say thank you, you've done incredible work! justine.lol and the projects within it are a treasure.

Quick question. Is there a way to use blinkenlights to debug interpreters? Can I type into stdin from the blinkenlights tui somehow? 

Regards,
Richie

Justine Tunney

lukematon,
9.5.2021 klo 12.23.449.5.2021
vastaanottaja R Z, blinkenlights
Not currently but I want that feature.  https://github.com/jart/cosmopolitan/issues/100

Assume we want to load the /lib/libc.musl-x86_64.so.1 interpreter. We'd need to update cosmopolitan/tool/build/lib/loader.c so it can apply the PT_DYNAMIC fixups to memory after the PT_LOAD segments are copied to memory. That's pretty much it. Once that's done, Blinkenlights should be able to beautifully simulate nearly all the Linux binaries that exist, regardless of what operating system it's run on.

There's only one other potential blocker you might encounter. See cosmopolitan/tool/build/lib/syscall.c We've got most of the Linux SYSCALL ABI covered already. The big one we're missing is the fork function. Adding that wouldn't be as trivial, since it'd likely require TUI elements to monitor the list of simulated processes.

--
You received this message because you are subscribed to the Google Groups "blinkenlights" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blinkenlight...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/blinkenlights/3d958db3-9a71-4527-87ff-b0d2281a2f96n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

R Z

lukematon,
9.5.2021 klo 12.25.069.5.2021
vastaanottaja blinkenlights
To add a bit more context, I'm using blinkenlights on windows using cmd.exe I'm having trouble typing into the TELETYPEWRITER section. I can see the letters that I type separated by spaces which is fine, but just can't figure out how to cleanly hit Enter and then continue my program.

R Z

lukematon,
9.5.2021 klo 12.26.509.5.2021
vastaanottaja blinkenlights
Ah I didn't see you replied until after I sent my last message. Thanks for the info!

Justine Tunney

lukematon,
9.5.2021 klo 12.32.089.5.2021
vastaanottaja R Z, blinkenlights
We might need to to update blinkenlights.c so that when it passes along terminal input on windows it translates \r keystrokes to \n

--
You received this message because you are subscribed to the Google Groups "blinkenlights" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blinkenlight...@googlegroups.com.
Vastaa kaikille
Vastaa kirjoittajalle
Välitä
0 uutta viestiä