INSTALL: How to enable debugging
authorAndy Dougherty <doughera@fractal.phys.lafayette.edu>
Fri, 21 Mar 1997 16:25:32 +0000 (11:25 -0500)
committerChip Salzenberg <chip@atlantic.net>
Sat, 8 Mar 1997 23:57:19 +0000 (11:57 +1200)
On Fri, 21 Mar 1997, Tom Christiansen wrote:

> BTW, why isn't there a makefile option to do this?  I looked in
> INSTALL, but really saw no obvious way to 'make me a perl with cc -g
> style debugging'.  There should be, or if there is, there should be
> clearer directions.

It's all spelled out for you when you run Configure interactively, of
course, but you already knew that :-)

p5p-msgid: Pine.SOL.3.95q.970321112326.1414A-100000@fractal.lafayette.edu
private-msgid: Pine.SOL.3.95q.970321112326.1414A-100000@fractal.lafayette.e

INSTALL

diff --git a/INSTALL b/INSTALL
index 6b36f93..be79c52 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -659,6 +659,23 @@ negligible.
 
 =back
 
+=head2 Building a debugging perl
+
+You can run perl scripts under the perl debugger at any time with
+B<perl -d>.  If, however, you want to debug perl itself,
+you probably want to do
+
+       sh Configure -Doptimize='-g'
+
+This will do two things:  First, it will force compilation to use
+B<cc -g> so that you can use your system's debugger on the executable.
+Second, it will add a C<-DDEBUGGING> to your ccflags variable in
+F<config.sh> so that you can use B<perl -D> to access perl's internal
+state.
+
+If you are using a shared libperl, see the warnings about multiple
+versions of perl under L<Building a shared libperl.so Perl library>.
+
 =head2 Other Compiler Flags
 
 For most users, all of the Configure defaults are fine.  However,