Hi
I set the registry setting BreakOnDllLoad to 1 to find a problem in the DllMain function of my dll. Like that WineDbg stops first while loading NTDll.dll. After continuing with c it stops again at Kernel32.dll. If I try now to continue with c I get an "illegal instruction in 32-bit code" and I can't continue. Without the registry setting it starts up without a problem. Has anyone else had this problem?
(WinNT4, Wine-20020804, all dlls builtin)
WineDbg starting on pid 81433c8 Loaded debug information from ELF 'wine' (0x00000000) Breakpoint 2 at 0x4000c714 (_end+0x37fbefec) Loaded debug information from ELF '/usr/local/lib/libntdll.dll.so' (0x4002b000) Loaded debug information from ELF '/usr/local/lib/libwine.so' (0x40125000) Loaded debug information from ELF '/usr/local/lib/libwine_unicode.so' (0x4013d000) No debug information in ELF '/lib/libm.so.6' (0x40207000) No debug information in ELF '/lib/libc.so.6' (0x4022b000) No debug information in ELF '/lib/libdl.so.2' (0x40353000) No debug information in ELF '/lib/ld-linux.so.2' (0x40000000) Loaded debug information from 32bit DLL 'C:\imd\Bin\ImdD.exe' (0x18000000) No debug information in 32bit DLL 'C:\WINDOWS\SYSTEM\NTDLL.DLL' (0x40063000) Stopping on DLL C:\WINDOWS\SYSTEM\NTDLL.DLL loading at 40063000
Wine-dbg>c No debug information in 32bit DLL 'C:\WINDOWS\SYSTEM\KERNEL32.DLL' (0x4084b000) Stopping on DLL C:\WINDOWS\SYSTEM\KERNEL32.DLL loading at 4084b000
Wine-dbg>c First chance exception: illegal instruction in 32-bit code (0xbffff3d6). In 32-bit mode. Register dump: CS:0023 SS:002b DS:002b ES:002b FS:008f GS:0000 EIP:bffff3d6 ESP:405c65d0 EBP:bffff3c4 EFLAGS:00010243( R- 00 I Z- - 1C) EAX:4001600c EBX:40015a60 ECX:bffff3c4 EDX:4001600c ESI:40016004 EDI:4001600c Stack dump: 0x405c65d0 (NTDLL.DLL.sscanf+0x33dd10): 4034db98 00000008 080501b8 40000660 0x405c65e0 (NTDLL.DLL.sscanf+0x33dd20): 405c6668 4000bcd0 00000003 bffff3c4 0x405c65f0 (NTDLL.DLL.sscanf+0x33dd30): 00000003 080501b8 405c6668 4032b6b1 0x405c6600 (NTDLL.DLL.sscanf+0x33dd40): bffff3d4 08050354 00000000 00000000 0x405c6610 (NTDLL.DLL.sscanf+0x33dd50): 40015a60 00000000 08050108 00009052 0x405c6620 (NTDLL.DLL.sscanf+0x33dd60): 4022a000 00000000 00000000 00000000 0x405c6630 (NTDLL.DLL.sscanf+0x33dd70):
0011: sel=008f base=401225c0 limit=00000fff 32-bit rw- Backtrace: =>0 0xbffff3d6 (KERNEL32.DLL.TryEnterCriticalSection+0x7f77005a) (ebp=bffff3c4) 1 0xbffff58f (KERNEL32.DLL.TryEnterCriticalSection+0x7f770213) (ebp=bffff57b) 2 0x636f6c2f (KERNEL32.DLL.TryEnterCriticalSection+0x22e678b3) (ebp=7273752f)
0xbffff3d6 (KERNEL32.DLL.TryEnterCriticalSection+0x7f77005a):
Wine-dbg>c Unhandled exception: illegal instruction in 32-bit code (0xbffff3d6). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:008f GS:0000 EIP:bffff3d6 ESP:405c65d0 EBP:bffff3c4 EFLAGS:00010243( R- 00 I Z- - 1C) EAX:4001600c EBX:40015a60 ECX:bffff3c4 EDX:4001600c ESI:40016004 EDI:4001600c Stack dump: 0x405c65d0 (NTDLL.DLL.sscanf+0x33dd10): 4034db98 00000008 080501b8 40000660 0x405c65e0 (NTDLL.DLL.sscanf+0x33dd20): 405c6668 4000bcd0 00000003 bffff3c4 0x405c65f0 (NTDLL.DLL.sscanf+0x33dd30): 00000003 080501b8 405c6668 4032b6b1 0x405c6600 (NTDLL.DLL.sscanf+0x33dd40): bffff3d4 08050354 00000000 00000000 0x405c6610 (NTDLL.DLL.sscanf+0x33dd50): 40015a60 00000000 08050108 00009052 0x405c6620 (NTDLL.DLL.sscanf+0x33dd60): 4022a000 00000000 00000000 00000000 0x405c6630 (NTDLL.DLL.sscanf+0x33dd70):
0011: sel=008f base=401225c0 limit=00000fff 32-bit rw- Backtrace: =>0 0xbffff3d6 (KERNEL32.DLL.TryEnterCriticalSection+0x7f77005a) (ebp=bffff3c4) 1 0xbffff58f (KERNEL32.DLL.TryEnterCriticalSection+0x7f770213) (ebp=bffff57b) 2 0x636f6c2f (KERNEL32.DLL.TryEnterCriticalSection+0x22e678b3) (ebp=7273752f)
0xbffff3d6 (KERNEL32.DLL.TryEnterCriticalSection+0x7f77005a):
Wine-dbg>c Invalid address for breakpoint 1, disabling it Invalid address for breakpoint 2, disabling it Process of pid=081433c8 has terminated
Thanks
Fabi
Has anyone else had this problem?
same here. a dirty hacked fix is attached. I'll post later on a decent fix to this pb
A+
Index: debugger/winedbg.c =================================================================== RCS file: /home/cvs/cvsroot/wine/wine/debugger/winedbg.c,v retrieving revision 1.64 diff -u -r1.64 winedbg.c --- debugger/winedbg.c 2 Aug 2002 19:00:53 -0000 1.64 +++ debugger/winedbg.c 28 Aug 2002 17:33:20 -0000 @@ -600,7 +600,8 @@ if (!DBG_IVAR(BreakOnAttach)) break; }
- DEBUG_context.ContextFlags = CONTEXT_CONTROL + handle_execpt: + DEBUG_context.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER #ifdef CONTEXT_SEGMENTS | CONTEXT_SEGMENTS @@ -764,6 +765,7 @@ { DEBUG_Printf(DBG_CHN_MESG, "Stopping on DLL %s loading at %08lx\n", buffer, (unsigned long)de->u.LoadDll.lpBaseOfDll); + goto handle_execpt; ret = TRUE; } break;