From ripley at stats.ox.ac.uk  Mon Jun 26 16:46:32 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon, 26 Jun 2006 15:46:32 +0100 (BST)
Subject: [Rd] Compiling R and packages with debug information?
In-Reply-To: <449FF08D.2020401@stats.uwo.ca>
References: <449FF08D.2020401@stats.uwo.ca>
Message-ID: <Pine.LNX.4.64.0606261544170.11982@gannet.stats.ox.ac.uk>

On Mon, 26 Jun 2006, Duncan Murdoch wrote:

> In Unix/Linux/Macos, how do I compile R or a package with debug
> information?  In Windows it's done by defining a DEBUG environment
> variable, but I don't see support for that in the Unix makefiles.  Is
> there a standard ./configure option to set this?

It is on by default, but controlled by setting CFLAGS/FFLAGS/CXXFLAGS
(which contain -g by default).

The reason the default is different is that we presume that a Unix-alike 
comes with a usable debugger (you may disagree, and it may not be true) 
and Windows does not (definitely an extra).

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] Compiling R and packages with debug information?
Prof Brian Ripley