Release 960811
Sun Aug 11 13:00:20 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [configure.in] [include/acconfig.h] [tools/build.c]
Added check for underscore on external symbols.
* [memory/selector.c] [memory/global.c]
Fixed FreeSelector() to free only one selector.
Added SELECTOR_FreeBlock() to free an array of selectors.
* [objects/color.c]
Fixed a bug in COLOR_ToLogical() that caused GetPixel() to fail on
hi-color displays.
* [tools/build.c] [if1632/crtdll.spec]
Added 'extern' type, used for external variables or functions.
* [windows/winpos.c]
Allow de-activating a window in WINPOS_ChangeActiveWindow().
* [windows/winproc.c]
Added 32-to-16 translation for button messages.
Fixed WINPROC_GetPtr() to avoid crashes on 32-bit procedures that
happen to be valid SEGPTRs.
Sat Aug 10 18:22:25 1996 Albrecht Kleine <kleine@ak.sax.de>
* [windows/message.c]
Removed a FIXME in MSG_PeekHardwareMsg(): produces correct
data for the JOURNALRECORD-hook (using EVENTMSG16 structure).
* [if1632/gdi.spec] [include/windows.h] [objects/metafile.c]
Introduced undocumented API function IsValidMetaFile(), plus a
minor fix in last patch of CopyMetaFile().
* [objects/gdiobj.c]
Removed a FIXME in IsGDIObject(): added magic word check.
Sun Aug 10 18:10:10 1996 Bruce Milner <Bruce.Milner@genetics.utah.edu>
* [controls/statuswin.c]
First pass at implementing the StatusWindow class.
* [include/commctrl.h]
Header file for common controls.
* [controls/widgets.c]
Added InitCommonControls().
* [if1632/comctl32.spec]
Add DrawStatusTextA, CreateStatusWindowA, InitCommonControls.
* [win32/findfile.c] [if1632/kernel32.spec]
Add FindNextFile32A, FindClose.
Modified FindFirstFile32A so it works with FindNextFile32A.
* [include/winbase.h]
Fixed WIN32_FIND_DATA structure member names.
Sat Aug 10 09:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [windows/scroll.c]
Changed scrolling routines to benefit from DCE code update.
Thu Aug 8 18:05:09 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/file.c]
SearchPath* could get NULL for lastpart argument.
* [if1632/build-spec.txt] [documentation/debugging]
Varargs documentation added, debugging hints updated.
* [if1632/crtdll.spec][misc/crtdll.c][misc/Makefile.in]
Started to implement CRTDLL.
* [if1632/wsock32.spec]
Some thunks to standard libc functions (structures have the same
elements, but perhaps wrong offset due to packing).
* [include/kernel32.h][include/windows.h][win32/*.c][loader/main.c]
Merged kernel32.h into windows.h.
* [misc/lstr.c]
Enhanced FormatMessage().
* [misc/main.c] [if1632/kernel.spec] [include/windows.h]
GetVersion() updated to new naming standard.
Changed language handling to support language ids.
* [misc/shell.c]
Enhanced FindExecutable, so it finds files in the search path too.
* [win32/environment.c]
GetCommandLine* updated.
* [loader/resource.c] [loader/pe_resource.c]
FindResourceEx32* added.
Loading of messagetables added.
Language handling now uses Wine default language id.
diff --git a/documentation/debugging b/documentation/debugging
index 1cee434..4b8bead 100644
--- a/documentation/debugging
+++ b/documentation/debugging
@@ -63,6 +63,7 @@
^^^^^^
|Returnvalue is 16 bit and has the value 7.
+
3. If you have found a misbehaving function, try to find out why it
misbehaves. Find the function in the source code. Try to make sense of
the arguments passed. Usually there is a
@@ -70,15 +71,30 @@
function. Rerun wine with "-debugmsg +xyz,+relay" added to the
commandline.
+ 4. If the crash happened in a function in WINE, find out the exact line using
+ gdb (the sample crash has another reason):
+|... somewhere in the backtrace ...
+|5 0x080e5ad8 (CreateWindowEx32A+0xd8)
+|...
+|$ gdb wine
+|...
+|(gdb) l *0x080e5ad8
+|0x80e5ad8 is in CreateWindowEx32A (win.c:837).
+|...
+|837 return WIN_CreateWindowEx( &cs, classAtom, FALSE );
+|...
- 4. If those information isn't clear enough or if you want to know more about
+
+ 5. If those information isn't clear enough or if you want to know more about
what's happening in the function itself, try running wine with "-debugmsg
+all", which dumps ALL included debug information in wine.
- 5. If that isn't enough add more debug output for yourself into the
+ 6. If that isn't enough add more debug output for yourself into the
functions you find relevant.
+ You might also try to run the program in gdb instead of using the
+ WINE-debugger.
- 6. You can also set a breakpoint for that function. Start wine with the
+ 7. You can also set a breakpoint for that function. Start wine with the
"-debug" option added to the commandline. After loading the executable
wine will enter the internal debugger. Use "break KERNEL.LSTRLEN"
(replace by function you want to debug, CASE IS RELEVANT.) to set a
@@ -95,7 +111,7 @@
Switch to UNIX shell, get the process-ID using "ps -a|grep wine", and do a
"kill -HUP <pid>" (without " and <>). Wine will then enter its internal
- debugger and you can procede as explained above.
+ debugger and you can proceed as explained above.
Program reports an error with a Messagebox
==========================================
@@ -113,6 +129,44 @@
above.
+Disassembling programs:
+=======================
+ You may also try to disassemble the offending program to check for
+ undocumented features and/or use of them.
+ The best, freely available, disassembler for win16 programs is
+ Windows Codeback, archivename wcbxxx.zip, which usually can be found
+ in the Cica-Mirror subdirectory on the WINE ftpsites. (See ANNOUNCE).
+ Disassembling win32 programs is currenty only possible using
+ Windows Disassembler 32, archivename something like wdasm32x.zip on
+ ftp.winsite.com and mirrors.
+ Understanding disassembled code is just a question of exercise.
+ Most code out there uses standard C function entries (for it is usually
+ written in C). Win16 function entries usually look like that:
+| push bp
+| mov bp, sp
+| ... function code ..
+| retf XXXX <--------- XXXX is number of bytes of arguments
+
+ This is a FAR function with no local storage. The arguments usually start
+ at [bp+6] with increasing offsets. Note, that [bp+6] belongs to the RIGHTMOST
+ argument, for exported win16 functions use the PASCAL calling convention.
+ So, if we use strcmp(a,b) with a and b both 32 bit variables b would be at
+ [bp+6] and a at [bp+10].
+ Most functions make also use of local storage in the stackframe:
+| enter 0086, 00
+| ... function code ...
+| leave
+| retf XXXX
+ This does mostly the same as above, but also adds 0x86 bytes of
+ stackstorage, which is accessed using [bp-xx].
+ Before calling a function, arguments are pushed on the stack using something
+ like this:
+| push word ptr [bp-02] <- will be at [bp+8]
+| push di <- will be at [bp+6]
+| call KERNEL.LSTRLEN
+ Here first the selector and then the offset to the passed string are pushed.
+
+
Sample debugging session:
=========================