develooper Front page | perl.perl5.porters | Postings from July 2016

[perl #128670] Out-of-date info on DEBUGGING in perlhacktips,perlrun

Thread Next
From:
James E Keenan via RT
Date:
July 27, 2016 23:53
Subject:
[perl #128670] Out-of-date info on DEBUGGING in perlhacktips,perlrun
Message ID:
rt-4.0.18-3448-1469663610-691.128670-15-0@perl.org
On Tue Jul 19 07:09:28 2016, gdg@zplane.com wrote:
> 
> This is a bug report for perl from gdg@zplane.com,
> generated with the help of perlbug 1.40 running under perl 5.24.0.
> 
> 
> -----------------------------------------------------------------
> [Please describe your issue here]
> 
> Both perlhacktips.pod and perlrun.pod contain some out of date info on
> enabling the compiler -DDEBUGGING option during configuration: Both
> documents
> indicate that running ./Configure with -Doptimize=-g will also enable
> the
> compiler -DDEBUGGING option, but this has evidently not been the case
> for
> many years.
> 
> Clarification regarding the relationship between the ./Configure
> -DDEBUGGING option and the compiler -DDEBUGGING option would also be
> helpful for the newbie perl hacker.
> 
> More in this thread:
> 
> http://www.nntp.perl.org/group/perl.perl5.porters/2016/07/msg238127.html
> 
> 

Are these the sections of the documentation which you find misleading?

#####
pod/perlhacktips.pod

=head2 Poking at Perl

To really poke around with Perl, you'll probably want to build Perl for
debugging, like this:

    ./Configure -d -D optimize=-g
    make

C<-g> is a flag to the C compiler to have it produce debugging
information which will allow us to step through a running program, and
to see in which C function we are at (without the debugging information
we might see only the numerical addresses of the functions, which is
not very helpful).

F<Configure> will also turn on the C<DEBUGGING> compilation symbol
which enables all the internal debugging code in Perl.  There are a
whole bunch of things you can debug with this: L<perlrun> lists them
all, and the best way to find out about them is to play about with
them.  The most useful options are probably
#####

#####
pod/perlrun.pod

All these flags require B<-DDEBUGGING> when you compile the Perl
executable (but see C<:opd> in L<Devel::Peek> or L<re/'debug' mode>
which may change this).
See the F<INSTALL> file in the Perl source distribution
for how to do this.  This flag is automatically set if you include B<-g>
option when C<Configure> asks you about optimizer/debugger flags.
#####

Thank you very much.

-- 
James E Keenan (jkeenan@cpan.org)

---
via perlbug:  queue: perl5 status: new
https://rt.perl.org/Ticket/Display.html?id=128670

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About