gdb core dump

Thomas Lumley
Fri, 16 Oct 1998 08:36:55 -0700 (PDT)

On 16 Oct 1998, Peter Dalgaard BSA wrote:

> Paul Gilbert <> 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


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
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: