Finding (or not) the exact number of args

Gaël de Chalendar at
Fri Jun 1 11:19:54 CDT 2001

Le Mercredi 23 Mai 2001 17:19, Andreas Mohr a écrit :
> You get a nice "crash" when the program hits an unimplemented function.
> Do a backtrace, then do a disas of the code that led to the unimplemented
> function. Count the number of pushes before that call. That's usually
> the number of arguments you need to use.

OK. Just to try I removed the stub for SHLWAPI_16. When asking for a 
backtrace (bt) in the wine debugger, I get the following. Where in that di I 
find the address where to disassemble ? 

Unhandled exception: unimplemented function shlwapi.16 called
 in 32-bit code (0x40765056).
In 32-bit mode.
0x40765056 (__wine_unimplemented+0x56 [shlwapi.spec.c:40] in SHLWAPI.DLL): 
jmp 0
x40765050 (__wine_unimplemented+0x50 [shlwapi.spec.c:40] in SHLWAPI.DLL)
43      void __wine_stub_shlwapi_4(void) { __wine_unimplemented("4"); }
=>0 0x40765056 (__wine_unimplemented+0x56(func=0x40770eff) 
[shlwapi.spec.c:40] in SHLWAPI.DLL) (ebp=40566cb8)
  1 0x40765170 (__wine_stub_shlwapi_17 [shlwapi.spec.c:53] in SHLWAPI.DLL) 
  2 0x00403a1a (<Debugged process>.EntryPoint+0x95c in <Debugged process>) 
  3 0x0040312c (<Debugged process>.EntryPoint+0x6e in <Debugged process>) 
  4 0x400d0e92 (start_process+0x1d6 [process.c:403] in 
  5 0x400d46b9 (SYSDEPS_DoCallOnStack+0x25(func=0x400d0cbc, arg=0x0) 
[sysdeps.c:173] in (ebp=40566ff0)
  6 0x400d4763 (SYSDEPS_CallOnStack+0x2f in (ebp=bffff17c)
  7 0x400d480d (SYSDEPS_SwitchToThreadStack+0x95(func=0x400d0cbc) 
[sysdeps.c:236] in (ebp=bffff1b8)
  8 0x400d11ef (PROCESS_InitWine+0x19f(argc=0x2, argv=0xbffff254, 
win16_exe_name=0x804c620, win16_exe_file=0x804c724) [process.c:525] in (ebp=bffff1d4)
  9 0x0804b1ee (Letext [main.c] in wine) (ebp=bffff1ec)
  10 0x40236cbe (NTDLL.DLL.sqrt+0x3362e in (ebp=bffff228)
  11 0x08049021 (_start+0x21 in wine) (ebp=00000000)

Gael de Chalendar
BP 133, 91 403 Orsay Cedex (France)
Tel : 01 69 85 80 04, Fax : 01 69 85 80 88
E-mail  : mailto:gael at
Web :

More information about the wine-devel mailing list