Csi
Csi

Reputation: 526

How to debug a crash that occur even if there is breakpoint at line 1?

I'm working on a program but this program crashes no matter where I put a breakpoint ( even when it's before the first instruction in main() ). I use the very basic code::blocks.

Do you know a method to debug it?

If I set no breakpoint, main() is fully executed before crashing ( there is one thing that does not give the expected results though ).

Upvotes: 0

Views: 106

Answers (1)

Christian Aichinger
Christian Aichinger

Reputation: 7227

All debuggers that I know of break in the case of a segfault and allow you to inspect the current program state and see what lead to the crash.

So in a way, outright segfaults can be pretty easy to debug since you don't have to figure out where to place the breakpoint :-)

Upvotes: 2

Related Questions