help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: identifying cause of segfault with gdb?


From: Bernd Strieder
Subject: Re: identifying cause of segfault with gdb?
Date: Tue, 13 Jul 2004 11:22:30 +0200
User-agent: KNode/0.7.2

Hello,

The question is quite general.

The cause of a segfault can be within code that is executed much earlier
than the code which is executed, when the segfault happens. Some data
is corrupted, but it is noticed probably much later. Gdb offers to stop
at certain places in code (via breakpoints) or on access of certain
memory areas (via watchpoints). You have to stop at some places to look
at the memory, and if you know what data is not as it should be,
leading to the crash later, then you can restart and stop whenever
changes are done there. You need repeatable runs, i.e. the same
happening whenever you restart.

Bernd Strieder



reply via email to

[Prev in Thread] Current Thread [Next in Thread]