Console problem

Michael Stefaniuc mstefani at redhat.de
Mon Dec 22 17:20:36 CST 2003


Hi,

On Mon, Dec 22, 2003 at 08:11:28PM +0100, Peter Oberndorfer wrote:
> I'm trying to get the freeware version of IDA (console) working, but if
you mean ida37fw? My experience is based on that one.

> i run it in wine it just hangs.
> If i run it with winedbg it works fine.
> I found out that the problem is that AllocConsole is never called for
> the application if it is being run from wine.
You can run it like this:
wineconsole -- --backend=user IDA.EXE
This will create the initial console too. If you want to change the
settings of the wineconsole just right click on it.
This will bring you IDA up and running (the time displayed in the upper
right corner gets updated every second) but keyboard/mouse input does
NOT work. This seems to be due to the emulated hardware interrupts not
being dispatched. After some minutes i get
 err:int:TIMER_TimerProc DOS timer has been stuck for 60 seconds...
The timer interrupt being int0 and having the highest priority it's
blocking the processing of int1 (keyboard). From the trace i see that
DOSVM_QueueEvent never signals the VM86 thread because there are always
pending request with higher priority.
As i didn't had too much time lately and my DOS skills aren't that good
i didn't got to dig deeper into the problem.

> But since IDA runs in the console subsystem it should get a console
> according to MSDN.
> MSDN says: The CONSOLE subsystem is for a Win32 character-mode
> application. Console applications are given a console by the operating
> system.
> 
> So here is the technical side of the problem:
> AllocConsole should get called from
> process_attach() ->dlls/kernel/kernel_main.c:180
> So the external variable main_create_flags tells us if we need a console.
> This variable is  set from  process_init() ->dlls/kernel/process.c:634
> This function itself performs the server call init_process() which
> returns 0 in create_flags from server/process.c:356
> So the problem is that there is no startup_info -> server call returns 0 -> 
> no console for the first process.
> 
> Setting process->create_flags = CREATE_NEW_CONSOLE from init_process() call 
> fixes the problem
Afair we already had a discussion about this. When CREATE_NEW_CONSOLE is
always set the output of some "simple" console apps (which use only
something like printf to ouput their stuff) can't be used anymore in
normal unix pipe chains. If you want to have a separate console just use
wineconsole instead of wine.

bye
	michael
-- 
Michael Stefaniuc               Tel.: +49-711-96437-199
System Administration           Fax.: +49-711-96437-111
Red Hat GmbH                    Email: mstefani at redhat.com
Hauptstaetterstr. 58            http://www.redhat.de/
D-70178 Stuttgart
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20031223/97e4142a/attachment.pgp


More information about the wine-devel mailing list