This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This happened when I tried to debug "real-life" Windows application. After I simplified the project and left only necessary bits to reproduce the bug. Steps to reproduce: - create a simple Windows application using WinAPI (see attached sample project) - build the application - set a breakpoint in line 10 in hellowin1.cc (before creating a window) - set a breakpoint in line 36 in mainwin.cc (in the window message handler) - start debugger Result: Application does not stop at breakpoints but starts successfully and application window appears. It looks oddly but breakpoints start working if I add "#include <iostream.h>" into hellowin1.cc.
Created attachment 51894 [details] sample WinAPI application
Created attachment 51899 [details] gdb log
Breakpoints work in Eclipse and in command line GDB.
Since breakpoints in shared libraries can't be set until the shared library is loaded, the standard way of doing this is to set an invisible and temporary breakpoint at main. When gdb stops at this breakpoint, it creates the "real" breakpoints. In a WinAPI app, there is no "main" function so the breakpoints don't get set. I added a check for Windows and create an invisible/temp breakpoint at WinMain. This successfully completes the breakpoint validation phase for all apps.
verified in trunk build 20071107
This is a requested NB 6.0 high resistance fix.
Created attachment 52682 [details] Patch against release60 version
Code changes reviewed by Thomas Preisler (thp).
Change committed into release60 branch.
verified in RC1 build (20071109)