Reputation: 2241
While developing in C in Netbeans on Ubuntu, at some point in development it became impossible to start the program in the Netbeans debugger (using gdb). Starting the debug process just failed to execute even the first line of the main
function. Even a breakpoint at that first line does not help; the process crashes before the breakpoint is hit.
The message displayed in the status bar:
Program Terminated by signal SIGSEGV
The program runs just fine outside of a debugger, and debugging the program directly with gdb (without Netbeans wrapping it) works fine too.
I already figured out how to resolve this (see below), but I'm posting this question anyway so others will find the solution when they run into the same problem.
Upvotes: 2
Views: 1720
Reputation: 2241
Turns out the 'Watches' I had set were the culprits. When I deleted them all, the debugging proceeded normally.
I'm not sure which Watch was the one causing the problem. At least one was a function call which would likely segfault when called at the wrong time. That's the one I suspect most.
I imagine that an unfortunate condition for a conditional breakpoint can cause similar behavior.
Hope this helps!
Upvotes: 3