Author Topic: Debugger "pauses" for each DLL  (Read 4626 times)

Offline Turbo

  • Single posting newcomer
  • *
  • Posts: 8
Debugger "pauses" for each DLL
« on: March 25, 2010, 04:52:33 pm »
Greetings all, maybe you can help me with this issue I've been having trouble with.

In my project in Windows, when I run the debugger (by pressing the Debug button), the debugger will run and pause for each DLL I've linked to my project (when it's linking to them I believe, before even reaching "main()" or any breakpoint I've set). Pressing the Debug button continues program execution, stopping at the next DLL.
Since I've linked quite a few shared libraries, each time I want to debug I have to press the debug button 20 times, and only then will my main() function be reached and I can properly debug.

My debug logger shows a message, after a point:

[New thread 1112.0x11a0]
Catchpoint 1 (exception thrown)
__static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at


I've looked around the net for a while, and got a few hints, but can't make much out of them:

"set stop-on-solib-events": tried setting this to 0 on the Debugger additional parameters, but had no effect
"__static_initialization_and_destruction_0": related to constructors


My debugger's output after pressing "debug" the first time and selecting "Call Stack":

PATH=.;L:\Paulo\Programma\libs\chipmunk\lib;L:\Paulo\Programma\libs\UtilsGraphics\libs;L:\Paulo\Programma\libs\Utils\libs;L:\Paulo\Programma\libs\GUIChan\libs;L:\Paulo\Programma\libs\AngelScript\lib;L:\Paulo\Programma\libs\AngelScriptAddons\libs;L:\Paulo\Programma\libs\ResourceManager\libs;L:\Paulo\Programma\libs\Allegro\lib\DynamicDebug;L:\Paulo\Programma\libs\ResourceManager\libsDependencies\dll;L:\Paulo\Programma\libs\BasicEngine\libs;L:\Paulo\Programma\libs\Allegro\lib\DynamicDebug;L:\Paulo\Programma\libs\Allegro\lib\DynamicRelease;g:\WindowsXP\mingw\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\QuickTime Alternative\QTSystem;g:\WindowsXP\ATI Technologies\ATI.ACE\Core-Static;g:\WindowsXP\TortoiseSVN\bin;G:\WindowsXP\MySQL\MySQL Server 5.1\bin
Command-line: g:\WindowsXP\mingw\bin\gdb.exe -nx -fullname  -quiet -args PhysicsActionPlatformerDbgDyn.exe
Working dir : L:\Paulo\Programma\Prototipos\PhysicsActionPlatformer\
> set prompt >>>>>>cb_gdb:
(gdb) >>>>>>cb_gdb:
> show version
GNU gdb 6.8
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
>>>>>>cb_gdb:
> set confirm off
>>>>>>cb_gdb:
> set width 0
>>>>>>cb_gdb:
> set height 0
>>>>>>cb_gdb:
> set breakpoint pending on
>>>>>>cb_gdb:
> set print asm-demangle on
>>>>>>cb_gdb:
> set unwindonsignal on
>>>>>>cb_gdb:
> set debugevents on
>>>>>>cb_gdb:
> set new-console on
>>>>>>cb_gdb:
> set disassembly-flavor att
>>>>>>cb_gdb:
> catch throw
Catchpoint 1 (throw)
>>>>>>cb_gdb:
> source G:\WindowsXP\CodeBlocks\share\codeblocks/scripts/stl-views-1.0.3.gdb
>>>>>>cb_gdb:
> directory L:/Paulo/Programma/Prototipos/PhysicsActionPlatformer/
>>>>>>cb_gdb:
> run
gdb: win32_init_thread_list
[New thread 1112.0x11a0]
Catchpoint 1 (exception thrown)
__static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at g:/WindowsXP/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:77
g:/WindowsXP/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:77:2988:beg:0x6f8fdc16
Current language:  auto; currently c++
>>>>>>cb_gdb:
> set debugevents off
>>>>>>cb_gdb:
> bt 30
#0  __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at g:/WindowsXP/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:77
#1  0x6f8fdc68 in global constructors keyed to _ZN3gcn6WindowC2Ev () at L:/Paulo/Programma/CB/Libraries/guichan-0.8.2/src/widgets/window.cpp:309
#2  0x6f90a077 in __do_global_ctors () at g:/WindowsXP/mingw/bin/../lib/gcc/mingw32/3.4.5/../../../../include/c++/3.4.5/iostream:77
#3  0x6f8c10e1 in DllMainCRTStartup@12 () from L:\Paulo\Programma\libs\GUIChan\libs\GUIChanD.dll
#4  0x7c90118a in ntdll!LdrSetAppCompatDllRedirectionCallback () from C:\WINDOWS\system32\ntdll.dll
#5  0x6f8c0000 in ?? ()
#6  0x00000001 in ?? ()
#7  0x0022fd30 in ?? ()
#8  0x6f8c1060 in __dll_exit () from L:\Paulo\Programma\libs\GUIChan\libs\GUIChanD.dll
#9  0x7c91bf2a in ntdll!LdrHotPatchRoutine () from C:\WINDOWS\system32\ntdll.dll
#10 0x7c920c24 in ntdll!RtlMapGenericMask () from C:\WINDOWS\system32\ntdll.dll
#11 0x7c920b1f in ntdll!RtlMapGenericMask () from C:\WINDOWS\system32\ntdll.dll
#12 0x7c90e457 in ntdll!LdrCreateOutOfProcessImage () from C:\WINDOWS\system32\ntdll.dll
>>>>>>cb_gdb:


Thanks for the help and excuses if this doesn't belong here.

Offline Loaden

  • Lives here!
  • ****
  • Posts: 1014
Re: Debugger "pauses" for each DLL
« Reply #1 on: March 27, 2010, 05:37:41 pm »

Offline Turbo

  • Single posting newcomer
  • *
  • Posts: 8
Re: Debugger "pauses" for each DLL
« Reply #2 on: March 27, 2010, 07:02:03 pm »
Thanks for the help, I definitely will try it out!