User forums > Using Code::Blocks

Debugger unresponsive -- C::B 10.07 + MSVC 10 + msoft debugging tools

(1/3) > >>

cellulose:
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:


--- Code: (debugger output) ---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
--- End code ---

(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:


--- Code: (debugger output) ---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
--- End code ---

Next theory:  Is it because it's breaking in SDLmain, and it can't find the source for that function?

oBFusCATed:
Are you sure you have debugging info embedded in the executable?
Also do you use the same arch for debugger and executable.
I'd trouble debugging my test 32bit apps with 64 bit debugger.
So, I advise you to keep them in sync.
Also you can try the latest debugger branch nightly build, it has some improvements in regard to CDB.

BTW, does debugging symple hello world apps work?

cellulose:
Speak of the devil.  I'd just seen this on the wiki:


--- Quote ---It seems that debugging a 32bit program with 64bit CDB doesn't work on Windows 7, but 32bit CDB works perfectly.
--- End quote ---

Tried a quick hello world program and it did not work.  I'll look for a 32-bit version of CDB...

EDIT: getting one through the Windows SDK installer.  My fingers are crossed~!

cellulose:
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?


--- Code: (debugger output) ---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
--- End code ---

oBFusCATed:
Does it work, from the command line?

Navigation

[0] Message Index

[#] Next page

Go to full version