Hello fellow Codeblockians. Longtime user and crossplatform dev here, though I don't visit the forums much.
I migrated my Windows/SDL project from cygwin to MSVC 10 as I switched computers recently.
Things are getting close to functional, but I've got a crash and the MSVC debugger is being rather uncooperative. I've installed the downloadable version of the Windows 7 SP1 x64 symbols, but it doesn't seem to change my symptoms:
Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: C:\Projects\Plaidgadget\dev\
Adding source dir: C:\Projects\Plaidgadget\dev\
Changing directory to: game/
Adding file: build\win\Savior-dbg.exe
Starting debugger:
done
Setting breakpoints
Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: build/win/Savior-dbg.exe
Symbol search path is: C:/Projects/Plaidgadget/dev/
Executable search path is:
ModLoad: 00000000`010f0000 00000000`01d77000 Savior-dbg.exe
ModLoad: 00000000`77780000 00000000`77929000 ntdll.dll
ModLoad: 00000000`77960000 00000000`77ae0000 ntdll32.dll
ModLoad: 00000000`73710000 00000000`7374f000 C:\Windows\SYSTEM32\wow64.dll
ModLoad: 00000000`736b0000 00000000`7370c000 C:\Windows\SYSTEM32\wow64win.dll
ModLoad: 00000000`736a0000 00000000`736a8000 C:\Windows\SYSTEM32\wow64cpu.dll
(18a8.42c): Break instruction exception - code 80000003 (first chance)
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
ntdll!CsrSetPriorityClass+0x40:
00000000`7782cb60 cc int 3
(the printout halts here and I'm unable to terminate the debugger or start a new session without closing Code::Blocks)
Notable weird things about my setup:
- My debug DLLs and EXE are in a separate location from the program's working directory.
- I use SCONS (a makefile replacement) to build the project rather than Code::Blocks' build system.
EDIT: I set the _NT_SYMBOL_PATH variable (to my installed symbols' location) which solved the failure to load NTDLL.dll symbols, but the hang persists:
Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: C:\Projects\Plaidgadget\dev\
Adding source dir: C:\Projects\Plaidgadget\dev\
Changing directory to: game/
Adding file: build\win\Savior-dbg.exe
Starting debugger:
done
Setting breakpoints
Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: build/win/Savior-dbg.exe
Symbol search path is: C:/Projects/Plaidgadget/dev/;C:\Symbols\
Executable search path is:
ModLoad: 00000000`010f0000 00000000`01d77000 Savior-dbg.exe
ModLoad: 00000000`77780000 00000000`77929000 ntdll.dll
ModLoad: 00000000`77960000 00000000`77ae0000 ntdll32.dll
ModLoad: 00000000`73710000 00000000`7374f000 C:\Windows\SYSTEM32\wow64.dll
ModLoad: 00000000`736b0000 00000000`7370c000 C:\Windows\SYSTEM32\wow64win.dll
ModLoad: 00000000`736a0000 00000000`736a8000 C:\Windows\SYSTEM32\wow64cpu.dll
(16f4.df0): Break instruction exception - code 80000003 (first chance)
ntdll!LdrpDoDebuggerBreak+0x30:
00000000`7782cb60 cc int 3
Next theory: Is it because it's breaking in SDLmain, and it can't find the source for that function?
Mind the doublepost.
So. Installed the x86 version of the debugging tools and configured C::B to use them. Still hanging, still can't terminate, but! I think installing the symbols from here might be a fix.
In the meantime, does anyone know how I can set the debugger to skip its initial breakpoint?
Building to ensure sources are up-to-date
Build succeeded
Selecting target:
Debug
Adding source dir: C:\Projects\Plaidgadget\dev\
Adding source dir: C:\Projects\Plaidgadget\dev\
Changing directory to: game/
Adding file: build\win\Savior-dbg.exe
Starting debugger:
done
Setting breakpoints
Microsoft (R) Windows Debugger Version 6.12.0002.633 X86
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: build/win/Savior-dbg.exe
Symbol search path is: C:/Projects/Plaidgadget/dev/;C:\Symbols\
Executable search path is:
ModLoad: 012e0000 01f67000 Savior-dbg.exe
ModLoad: 77960000 77ae0000 ntdll.dll
ModLoad: 76eb0000 76fc0000 C:\Windows\syswow64\kernel32.dll
ModLoad: 75310000 75356000 C:\Windows\syswow64\KERNELBASE.dll
ModLoad: 723d0000 72404000 C:\Program Files\AVAST Software\Avast\snxhk.dll
ModLoad: 69890000 6991c000 C:\Projects\Plaidgadget\dev\build\win\SDL_net.dll
ModLoad: 73470000 73477000 C:\Windows\SysWOW64\WSOCK32.dll
ModLoad: 76e70000 76ea5000 C:\Windows\syswow64\WS2_32.dll
ModLoad: 750a0000 7514c000 C:\Windows\syswow64\msvcrt.dll
ModLoad: 768b0000 769a0000 C:\Windows\syswow64\RPCRT4.dll
ModLoad: 75040000 750a0000 C:\Windows\syswow64\SspiCli.dll
ModLoad: 75030000 7503c000 C:\Windows\syswow64\CRYPTBASE.dll
ModLoad: 76fc0000 76fd9000 C:\Windows\SysWOW64\sechost.dll
ModLoad: 75420000 75426000 C:\Windows\syswow64\NSI.dll
ModLoad: 65be0000 65cd7000 C:\Projects\Plaidgadget\dev\build\win\SDL.dll
ModLoad: 72250000 72282000 C:\Windows\SysWOW64\WINMM.dll
ModLoad: 75430000 75530000 C:\Windows\syswow64\USER32.dll
ModLoad: 75280000 75310000 C:\Windows\syswow64\GDI32.dll
ModLoad: 76e60000 76e6a000 C:\Windows\syswow64\LPK.dll
ModLoad: 76a40000 76add000 C:\Windows\syswow64\USP10.dll
ModLoad: 769a0000 76a40000 C:\Windows\syswow64\ADVAPI32.dll
ModLoad: 10000000 10148000 C:\Projects\Plaidgadget\dev\build\win\mpir.dll
ModLoad: 697c0000 69888000 C:\Windows\SysWOW64\OPENGL32.dll
ModLoad: 6cbc0000 6cbe2000 C:\Windows\SysWOW64\GLU32.dll
ModLoad: 747e0000 748c7000 C:\Windows\SysWOW64\DDRAW.dll
ModLoad: 747d0000 747d6000 C:\Windows\SysWOW64\DCIMAN32.dll
ModLoad: 76470000 7660d000 C:\Windows\syswow64\SETUPAPI.dll
ModLoad: 76fe0000 77007000 C:\Windows\syswow64\CFGMGR32.dll
ModLoad: 77010000 7709f000 C:\Windows\syswow64\OLEAUT32.dll
ModLoad: 76610000 7676c000 C:\Windows\syswow64\ole32.dll
ModLoad: 76890000 768a2000 C:\Windows\syswow64\DEVOBJ.dll
ModLoad: 747b0000 747c3000 C:\Windows\SysWOW64\dwmapi.dll
(1100.2158): Break instruction exception - code 80000003 (first chance)
eax=00000000 ebx=00000000 ecx=13880000 edx=0025de18 esi=fffffffe edi=00000000
eip=77a00f3b esp=0039fa44 ebp=0039fa70 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
ntdll!LdrVerifyImageMatchesChecksum+0x96c:
77a00f3b cc int 3
It appears to work from the command line, though I need to input the "g" command twice before it gets to running the program. Once on a warning about C:/symbols missing (as I've uninstalled the x64 symbols and am downloading the x86 ones) and once on an initial breakpoint.
After that it proceeds promptly to my program's crash. :)
EDIT: Using 'g' on Code::Blocks' command prompt sadly has no effect...
EDIT 2: This looks foreboding considering my separate-build-and-working-directory setup: http://forums.codeblocks.org/index.php?topic=14085.0
EDIT 3: here's my command-line run, prior to the second 'g' command which starts my program:
C:\Projects\Plaidgadget\dev\game>"C:/Program Files (x86)/Debugging tools for windows (x86)/cdb.exe" cdb ../build/win/Sav
ior-dbg.exe
Microsoft (R) Windows Debugger Version 6.12.0002.633 X86
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: cdb ../build/win/Savior-dbg.exe
WARNING: Inaccessible path: 'C:\Symbols\'
Symbol search path is: C:\Symbols\
Executable search path is:
ModLoad: 00ee0000 00f40000 cdb.exe
ModLoad: 77960000 77ae0000 ntdll.dll
ModLoad: 76eb0000 76fc0000 C:\Windows\syswow64\kernel32.dll
ModLoad: 75310000 75356000 C:\Windows\syswow64\KERNELBASE.dll
ModLoad: 723d0000 72404000 C:\Program Files\AVAST Software\Avast\snxhk.dll
ModLoad: 750a0000 7514c000 C:\Windows\syswow64\msvcrt.dll
ModLoad: 65530000 658cb000 C:\Program Files (x86)\Debugging tools for windows (x86)\dbgeng.dll
ModLoad: 653e0000 65521000 C:\Program Files (x86)\Debugging tools for windows (x86)\dbghelp.dll
ModLoad: 73460000 73469000 C:\Windows\SysWOW64\VERSION.dll
ModLoad: 769a0000 76a40000 C:\Windows\syswow64\ADVAPI32.dll
ModLoad: 76fc0000 76fd9000 C:\Windows\SysWOW64\sechost.dll
ModLoad: 768b0000 769a0000 C:\Windows\syswow64\RPCRT4.dll
ModLoad: 75040000 750a0000 C:\Windows\syswow64\SspiCli.dll
ModLoad: 75030000 7503c000 C:\Windows\syswow64\CRYPTBASE.dll
(21e4.21a8): Break instruction exception - code 80000003 (first chance)
eax=00000000 ebx=00000000 ecx=33870000 edx=001adf88 esi=fffffffe edi=00000000
eip=77a00f3b esp=0021f490 ebp=0021f4bc iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
ntdll!LdrVerifyImageMatchesChecksum+0x96c:
77a00f3b cc int 3
0:000> g
Microsoft (R) Windows Debugger Version 6.12.0002.633 X86
Copyright (c) Microsoft Corporation. All rights reserved.
CommandLine: ../build/win/Savior-dbg.exe
ModLoad: 746a0000 746ec000 C:\Windows\SysWOW64\apphelp.dll
(21e4.21a8): Illegal instruction - code c000001d (first chance)
ModLoad: 63d70000 64069000 C:\Program Files (x86)\Debugging tools for windows (x86)\winext\ext.dll
ModLoad: 68a10000 68a85000 C:\Program Files (x86)\Debugging tools for windows (x86)\WINXP\exts.dll
ModLoad: 697d0000 697ed000 C:\Program Files (x86)\Debugging tools for windows (x86)\winext\uext.dll
ModLoad: 67c00000 67c16000 C:\Program Files (x86)\Debugging tools for windows (x86)\WINXP\ntsdexts.dll
ModLoad: 697c0000 697cb000 C:\Program Files (x86)\Debugging tools for windows (x86)\WINXP\wow64exts.dll
WARNING: Inaccessible path: 'C:\Symbols\'
Symbol search path is: C:\Symbols\
Executable search path is:
ModLoad: 012e0000 01f67000 Savior-dbg.exe
ModLoad: 77960000 77ae0000 ntdll.dll
ModLoad: 76eb0000 76fc0000 C:\Windows\syswow64\kernel32.dll
ModLoad: 75310000 75356000 C:\Windows\syswow64\KERNELBASE.dll
ModLoad: 723d0000 72404000 C:\Program Files\AVAST Software\Avast\snxhk.dll
ModLoad: 65990000 65a1c000 C:\Projects\Plaidgadget\dev\build\win\SDL_net.dll
ModLoad: 73470000 73477000 C:\Windows\SysWOW64\WSOCK32.dll
ModLoad: 76e70000 76ea5000 C:\Windows\syswow64\WS2_32.dll
ModLoad: 750a0000 7514c000 C:\Windows\syswow64\msvcrt.dll
ModLoad: 768b0000 769a0000 C:\Windows\syswow64\RPCRT4.dll
ModLoad: 75040000 750a0000 C:\Windows\syswow64\SspiCli.dll
ModLoad: 75030000 7503c000 C:\Windows\syswow64\CRYPTBASE.dll
ModLoad: 76fc0000 76fd9000 C:\Windows\SysWOW64\sechost.dll
ModLoad: 75420000 75426000 C:\Windows\syswow64\NSI.dll
ModLoad: 63c70000 63d67000 C:\Projects\Plaidgadget\dev\build\win\SDL.dll
ModLoad: 72250000 72282000 C:\Windows\SysWOW64\WINMM.dll
ModLoad: 75430000 75530000 C:\Windows\syswow64\USER32.dll
ModLoad: 75280000 75310000 C:\Windows\syswow64\GDI32.dll
ModLoad: 76e60000 76e6a000 C:\Windows\syswow64\LPK.dll
ModLoad: 76a40000 76add000 C:\Windows\syswow64\USP10.dll
ModLoad: 769a0000 76a40000 C:\Windows\syswow64\ADVAPI32.dll
ModLoad: 10000000 10148000 C:\Projects\Plaidgadget\dev\build\win\mpir.dll
ModLoad: 63ba0000 63c68000 C:\Windows\SysWOW64\OPENGL32.dll
ModLoad: 67bd0000 67bf2000 C:\Windows\SysWOW64\GLU32.dll
ModLoad: 747e0000 748c7000 C:\Windows\SysWOW64\DDRAW.dll
ModLoad: 747d0000 747d6000 C:\Windows\SysWOW64\DCIMAN32.dll
ModLoad: 76470000 7660d000 C:\Windows\syswow64\SETUPAPI.dll
ModLoad: 76fe0000 77007000 C:\Windows\syswow64\CFGMGR32.dll
ModLoad: 77010000 7709f000 C:\Windows\syswow64\OLEAUT32.dll
ModLoad: 76610000 7676c000 C:\Windows\syswow64\ole32.dll
ModLoad: 76890000 768a2000 C:\Windows\syswow64\DEVOBJ.dll
ModLoad: 747b0000 747c3000 C:\Windows\SysWOW64\dwmapi.dll
(2298.208c): Break instruction exception - code 80000003 (first chance)
ModLoad: 76ae0000 76ae5000 C:\Windows\SysWOW64\psapi.dll
ModLoad: 65a20000 65a68000 C:\Program Files (x86)\Debugging tools for windows (x86)\symsrv.dll
eax=00000000 ebx=00000000 ecx=29b50000 edx=001be168 esi=fffffffe edi=00000000
eip=77a00f3b esp=0015f9f0 ebp=0015fa1c iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00000246
*** ERROR: Symbol file could not be found. Defaulted to export symbols for ntdll.dll -
ntdll!LdrVerifyImageMatchesChecksum+0x96c:
77a00f3b cc int 3
0:000>