POV-Ray : Newsgroups : povray.unix : Debugging and line numbers : Re: Debugging and line numbers Server Time
17 May 2024 00:53:36 EDT (-0400)
  Re: Debugging and line numbers  
From: Jim Henderson
Date: 2 Feb 2009 13:21:56
Message: <498739c4$1@news.povray.org>
On Mon, 02 Feb 2009 11:54:22 -0500, clipka wrote:

> So now I got very frequent segfaults in my development version of
> POV-Ray - frequent enough to be reproducible even with the non-optimized
> debug version within a few seconds. Time to track them down with
> valgrind and gdb.
> 
> Hum... so now I know in which *function* it crashes - but what do I have
> to do in order to get the *line number*??
> 
> Digging through assembler code and trying to match it with the C++
> source code is a bit cumbersome, so I guess there *must* be an easier
> way... even Linux jockeys can't be *that* masochistic :)
> 
> I knew I wouldn't like debugging under Linux :S

I'd second Thierry's suggestion - make sure you also compile with 
symbolic information enabled (-g as I recall).

Another approach would be to run the program under strace.  gdb will give 
you the ability to look at the call stack, though, where strace will just 
give you a starting point.

Jim


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.