This one is even more important:
---BREAK ON Entry Point Setting---
http://sourceforge.net/tracker/index.php?func=detail&aid=1280759&group_id=126998&atid=707419most debuggers provide this. either an option or a setting that allow that put a breakpoint on the program entry point so that it breaks before anything loads.
why?
look at code blocks for example: it links against the sdk dll and manually loads the other dlls (plugins). nothing can be done about wanting to set breakpoints on the plugin dll source lines until after codeblocks finished loading them but this is a problem with all debuggers (dlls have autorebase usually).
but... try this:
gdb codeblocks.exe
break autodetectcompilers.cpp:70
no go. it just doesn't work.
now try this:
gdb codeblocks.exe
info target
You'll see: Entry point: 0x401220
break *0x401220
run
It breaks in mainCRTStartup() (within msvcrt.dll)
break autodetectcompilers.cpp:70
it works. since codeblocks links against codeblocks.dll (sdk) it can set breakpoints within sdk/* source files on the EP (entry point) is reached. The program hasn't run anything yet, and you can put breakpoints anywhere. perfect