Re: Expect spawns on 64-bit Windows
- From: David Gravereaux <davygrvy@xxxxxxxxx>
- Date: Tue, 30 Oct 2007 12:53:04 -0700
LisaY wrote:
Any ideas on why Expect isn't seeing the I/O from myapp, and how I can
get this to work? Many thanks for any feedback.
Expect for Windows uses a rather bizarre method to intercept the text sent to
the console. As the concept of a pty style stream does not exist on the
windows platform, it was necessary to run the child in the system debugger and
catch all calls the app makes to any of the win32 console API functions in
break-points and copy the text from the parameters and push that text into a
stream. It's that stream emulation that is tricky and most likely the source
of the empty string under your running conditions.
If you don't mind doing some developer work, the source for E4W is available
so you can step-debug the, umm, step-debugger to find the bug. All the meat
is located in expWinConsoleDebugger.cpp and associates.
I know this is the problem with DOS-16 apps and E4W. The NTVDM does itself
have a limited debugger inside it, but the thunking of screen output from
direct memory access of DOS apps by the NTVDM to Win32 calls is unfortunately
happening on the kernel side of the fence.
If you determine that the thunk layer managing the cross from 32 to 64 is
happening in kernel-mode, there is no way the system debugger method can catch
those calls...
One of these days someone at Redmond might provide some appropriate
acceptability/handicap hooks for the console that would be perfect for E4W.
Square pegs can fit in round holes using a correctly weighted hammer.
--
David Gravereaux <davygrvy@xxxxxxxxx>
[species:human; planet:earth,milkyway(western spiral arm),alpha sector]
Attachment:
signature.asc
Description: OpenPGP digital signature
- References:
- Expect spawns on 64-bit Windows
- From: LisaY
- Expect spawns on 64-bit Windows
- Prev by Date: Re: tablelist: possible to have embedded window that grows with the column?
- Next by Date: Re: tablelist: possible to have embedded window that grows with the column?
- Previous by thread: Expect spawns on 64-bit Windows
- Next by thread: Restart an application
- Index(es):
Relevant Pages
|