From thomas@biostat.washington.edu  Fri Oct 16 16:36:55 1998
From: thomas@biostat.washington.edu (Thomas Lumley)
Date: Fri, 16 Oct 1998 08:36:55 -0700 (PDT)
Subject: gdb core dump
In-Reply-To: <x2ogrca561.fsf@blueberry.kubism.ku.dk>
Message-ID: <Pine.GSO.4.03.9810160831490.13331-100000@wompom.biostat.washington.edu>

On 16 Oct 1998, Peter Dalgaard BSA wrote:

> Paul Gilbert <pgilbert@bank-banque-canada.ca> writes:
> 
> > When I get a segmentation fault and core dump can I use gdb to examine the core
> > file and get any useful information about why and where things went wrong? Do I
> > need to compile R in a special way to do this? Obviously I'm a newbie at this.
> > Details would be appreciated.
> > 
> > Paul Gilbert
> 
> Just execute as
> 
> R -d gdb
> 
> (and type 'run')
> 

In order for this to be as useful as possible you should do it before 
	make install
so that gdb can find the source files and display them for you.

Also, compilers vary in how useful their optimised output is for
debugging. I find that the Sun compiler loses line number information when
optimisation is specified, and just keeps track of which function you are
in. gcc keeps line number information, which makes it better for debugging
purposes.

	-thomas



Thomas Lumley
------------------------------------------------------+------
Biostatistics		: "Never attribute to malice what  :
Uni of Washington	:  can be adequately explained by  :
Box 357232		:  incompetence" - Hanlon's Razor  :
Seattle WA 98195-7232	:				   :
------------------------------------------------------------

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


gdb core dump
Thomas Lumley