• Expect for windows, closer

    From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Sat Aug 30 01:22:57 2025
    From Newsgroup: comp.lang.tcl

    Just a note to the group that I'm progressing with E4W. I have it
    building for 32-bit from Visual Studio 17.14.13 on Windows 10. No
    release is ready at this time as I lack a way of testing. There is the
    WOW thunk layer for running 32-bit apps on 64, but I'd prefer not to use
    it for debugging the debugger ;) It might work, unsure. I guess I
    should set up a development environment on XP in maybe a virtual machine
    or something?

    A 64-bit build is hampered by how the DbgHelp APIs have changed for
    WIN64. Also the low-level aspects of how the extension sets debugger breakpoints on interested console API calls is just far too complex and fragile for me to manage.

    A deep rewrite is needed to move to a method called trampolines provided
    by the Detours library. Getting [interact] to work with that will be challenging, though. trampolines would run inside the spawned process
    which means IPC mailboxing is needed for both directions.

    https://github.com/davygrvy/expect4win
    https://github.com/microsoft/Detours
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From David Gravereaux@davygrvy@pobox.com to comp.lang.tcl on Mon Sep 1 13:26:35 2025
    From Newsgroup: comp.lang.tcl

    On 8/30/2025 1:22 AM, David Gravereaux wrote:
    A deep rewrite is needed to move to a method called trampolines provided
    by the Detours library.  Getting [interact] to work with that will be challenging, though.  trampolines would run inside the spawned process which means IPC mailboxing is needed for both directions.

    https://github.com/davygrvy/expect4win
    https://github.com/microsoft/Detours

    https://github.com/microsoft/Detours/wiki

    Expect builds for 64-bit now! A bare shell, though, and ready for me to
    fill it.

    https://github.com/davygrvy/expect4win/blob/d4b028f95ede1458c3685d4815be59a29b5d3cbf/win/expWinConsoleDetourer.cpp#L192

    [exp_send_user] might be able to work in cooked mode on Win10 and 11 https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
    --- Synchronet 3.21a-Linux NewsLink 1.2