I got a case where winedbg crashes when reading a pdb file, because "root" is 0. Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x405a7e37). In 32-bit mode. 0x405a7e37 (DEBUG_ProcessPDBFile+0x11f [msc.c:2590] in winedbg.exe.so): movl 0x0(%edx),%eax 2590 switch ( root->version ) Wine-dbg>cont First chance exception: page fault on read access to 0x00000000 in 32-bit code (0x405a7e37). Register dump: CS:0023 SS:002b DS:002b ES:002b FS:003b GS:0033 EIP:405a7e37 ESP:407f29f4 EBP:407f2ac8 EFLAGS:00010246( R- 00 I Z- -P1 ) EAX:407f2a3c EBX:405c44a8 ECX:00000000 EDX:00000000 ESI:40aa5010 EDI:00000003 Stack dump: 0x407f29f4 (_end+0x212f90): 407f2a3c 407f2a30 00000000 407f2a7c 0x407f2a04 (_end+0x212fa0): 00000000 40ab0000 00000000 00000003 0x407f2a14 (_end+0x212fb0): 00000002 407f2a20 00000000 00000000 0x407f2a24 (_end+0x212fc0): 00000000 00000000 40ab0000 00000000 0x407f2a34 (_end+0x212fd0): 0000004c 00000050 00000000 00000000 0x407f2a44 (_end+0x212fe0): 00000000 00000000 00000000 00000000 0x407f2a54 (_end+0x212ff0): Backtrace: =>0 0x405a7e37 (DEBUG_ProcessPDBFile+0x11f(module=0x3c9a6758, filename=0x40aa5010, timestamp=0x38e8c154) [msc.c:2590] in winedbg.exe.so) (ebp=407f2ac8) 1 0x405a81ba (DEBUG_ProcessCodeView+0x6e(module=0x3c9a6758, root=0x40aa5000) [msc.c:2833] in winedbg.exe.so) (ebp=407f2af4) 2 0x405a837f (DEBUG_ProcessDebugDirectory+0xb7(module=0x3c9a6758, file_map=0x408f0000, dbg=0x40a0d000, nDbg=0x1) [msc.c:2874] in winedbg.exe.so) (ebp=407f2b0c) 3 0x405a86b1 (DEBUG_RegisterMSCDebugInfo+0x239(module=0x3c9a6758, hFile=0x44, _nth=0x407f2bc0, nth_ofs=0xf8) [msc.c:3064] in winedbg.exe.so) (ebp=407f2b5c) 4 0x405a54b5 (DEBUG_LoadModule32+0x185(name=0x407f2ce8, hFile=0x44, base=0x40892000) [module.c:307] in winedbg.exe.so) (ebp=407f2ccc) 5 0x405afae4 (.L280+0x51 [winedbg.c] in winedbg.exe.so) (ebp=407f2df4) 6 0x405afda2 (DEBUG_MainLoop+0x42 [winedbg.c:959] in winedbg.exe.so) (ebp=407f2e68) 7 0x405b00c7 (main+0xbf(argc=0x2, argv=0xbfffdd18) [winedbg.c:1182] in winedbg.exe.so) (ebp=407f2e9c) 8 0x4059916c (__wine_exe_main+0x38 [winedbg.exe.spec.c:556] in winedbg.exe.so) (ebp=407f2eb0) 9 0x400892ae (start_process+0x22e(arg=0x0) [process.c:1622] in libntdll.dll.so) (ebp=407f2ff4) 10 0x400a6d54 (SYSDEPS_SwitchToThreadStack+0x14 in libntdll.dll.so) (ebp=00000000) 0x405a7e37 (DEBUG_ProcessPDBFile+0x11f [msc.c:2590] in winedbg.exe.so): movl 0x0(%edx),%eax 2590 switch ( root->version ) Changes: Avoid crashing when unable to read pdb file.
Index: programs/winedbg/msc.c =================================================================== RCS file: /home/wine/wine/programs/winedbg/msc.c,v retrieving revision 1.1 diff -u -w -p -r1.1 msc.c --- programs/winedbg/msc.c 13 Sep 2002 17:54:28 -0000 1.1 +++ programs/winedbg/msc.c 31 Jul 2003 21:46:04 -0000 @@ -2583,6 +2583,14 @@ static enum DbgInfoLoad DEBUG_ProcessPDB pdb_convert_types_header( &types, types_image ); pdb_convert_symbols_header( &symbols, &header_size, symbols_image ); + if ( !root ) + { + DEBUG_Printf( DBG_CHN_ERR, + "-Unable to get root from .PDB file %s\n", + filename ); + goto leave; + } + /* * Check for unknown versions */
-- Try Anarchy Online http://www.anarchy-online.com/content/downloads/tryout/ Netiquette guidelines ftp://ftp.rfc-editor.org/in-notes/rfc1855.txt How to quote properly http://www.i-hate-computers.demon.co.uk/ Hvordan sitere riktig http://home.online.no/~vidaandr/news/OBSquoting.html