Debug Channels trashed
mike at navi.cx
Sun Aug 29 06:24:02 CDT 2004
On Sat, 28 Aug 2004 19:30:58 +0200, Uwe Bonnes wrote:
> It seems the location of the debug channels is picked up from the ebx
%ebx is supposed to point to the ELF global offset table, iirc. If it's
been reset somewhere then it could cause this sort of crash when accessing
global vars in an external library as I imagine debug channels are.
The offending line is printing the *return* value of the function so I
really suspect this is similar to a problem reported earlier this year (?)
where some win32 code wasn't performing register saves correctly. I bet
this is the same problem.
> I wonder what can trash the testing of the debug channels. I ran with +heap
> to look for heap corruption, but couldn't find something.
Try wrapping the window proc callout with some code that saves %ebx on the
stack. There is an example in another part of the code but I can't
remember what! :(
If you compile the relevant DLL with optimization off you may be able to
get away with this for testing the theory:
// make the call to the wndproc here
// now test the debug channel and carry on
The reason it works if you comment out the debug channel code is that %ebx
is reset by gcc generated code on entry to an ELF exported function.
More information about the wine-devel