When I debug a program with winedbg, it's output never goes to the same terminal. If it's compiled with -mconsole, it goes to a new console window; if compiled with -mwindows, the output is discarded. Any way to change this behavior?
Le 21/04/2012 10:33, Ilya Basin a écrit :
When I debug a program with winedbg, it's output never goes to the same terminal. If it's compiled with -mconsole, it goes to a new console window; if compiled with -mwindows, the output is discarded. Any way to change this behavior?
if your debuggee is a CUI (compiled with -m console), then winedbg forces to have two consoles, one for winedbg, the other one for the debuggee program that's a decision. if you want to change this, remove the CREATE_NEW_CONSOLE flag in programs/winedbg/tgt_active.c (actually we could make this an optional behavior of winedbg to share the current console with debuggee's output)
if your debuggee is a GUI, it's windows default behavior not to create automatically a console for this program you need to call AllocConsole() in your debuggee for that. and it that case, wine will likely have to create a new window for the console
A+