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: Jan Rendek
Subject: Re: identifying cause of segfault with gdb?
Date: Tue, 13 Jul 2004 09:10:40 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.4) Gecko/20030630

Amit Bhatia wrote:
Hello.
 Is it possible to identify the source of a segmentation fault(which is most
probably being caused due to memory access of place which I am not allowed
to) using gdb?
 I wish to know the name of the erring call or line no in the method where
this could be happening.
 I am using g++ 3.2 on redhat 9.0, and do compile with -c -pg flag.(and
finally make libmyown.a and then link it to the compiled test program).

You must turn the debug information on using the -g flag.
GDB will be able to use the extra info to point out where
your program crashes

--
Jan Rendek
INRIA Lorraine
r e n d e k @ l o r i a . f r



reply via email to

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