X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperldebug.pod;h=bccdcf4f5164772e6b056c701b5bdf2f4443a710;hb=40b568c93a31cb8feae8a14551365dff7e76b624;hp=ead5414ccfa75142c8c1a66aecc70e64d94a0119;hpb=200f06d0560bb35c44d4f11900efe1b9030aadea;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perldebug.pod b/pod/perldebug.pod index ead5414..bccdcf4 100644 --- a/pod/perldebug.pod +++ b/pod/perldebug.pod @@ -68,7 +68,7 @@ You may change the pager which is used via C command. =item p expr Same as C in the current package. In particular, -because this is just Perl's own B function, this means that nested +because this is just Perl's own C function, this means that nested data structures and objects are not dumped, unlike with the C command. The C filehandle is opened to F, regardless of @@ -211,7 +211,7 @@ breakpoint on the line about to be executed. If a condition is specified, it's evaluated each time the statement is reached: a breakpoint is taken only if the condition is true. Breakpoints may only be set on lines that begin an executable statement. Conditions -don't use B: +don't use C: b 237 $x > 30 b 237 ++$count237 < 11 @@ -416,7 +416,7 @@ Run the debugger command, piping DB::OUT into your current pager. =item ||dbcmd -Same as C<|dbcmd> but DB::OUT is temporarily Bed as well. =item = [alias value] @@ -488,16 +488,23 @@ Run Tk while prompting (with ReadLine). =item C, C, C -Level of verbosity. By default, the debugger prints backtraces -upon receiving any kind of warning (this is often annoying) and -fatal exceptions (this is often valuable). It will attempt to print -a message when uncaught INT, BUS, or SEGV signals arrive. - -To disable this behaviour, set these values to 0. If C -is 2, the debugger usurps your own exception handler and prints out -a trace of these, replacing your exceptions with its own. This may -be useful for some tracing purposes, but tends to hopelessly destroy -any program that takes its exception handling seriously. +Level of verbosity. By default, the debugger leaves your exceptions +and warnings alone, because altering them can break correctly running +programs. It will attempt to print a message when uncaught INT, BUS, or +SEGV signals arrive. (But see the mention of signals in L below.) + +To disable this default safe mode, set these values to something higher +than 0. At a level of 1, you get backtraces upon receiving any kind +of warning (this is often annoying) or exception (this is +often valuable). Unfortunately, the debugger cannot discern fatal +exceptions from non-fatal ones. If C is even 1, then your +non-fatal exceptions are also traced and unceremoniously altered if they +came from C strings or from any kind of C within modules +you're attempting to load. If C is 2, the debugger doesn't +care where they came from: It usurps your exception handler and prints +out a trace, then modifies all exceptions with its own embellishments. +This may perhaps be useful for some tracing purposes, but tends to hopelessly +destroy any program that takes its exception handling seriously. =item C @@ -760,6 +767,11 @@ Breakable lines are marked with C<:>. Lines with breakpoints are marked by C and those with actions by C. The line that's about to be executed is marked by C<< ==> >>. +Please be aware that code in debugger listings may not look the same +as your original source code. Line directives and external source +filters can alter the code before Perl sees it, causing code to move +from its original positions or take on entirely different forms. + =item Frame listing When the C option is set, the debugger would print entered (and @@ -927,5 +939,14 @@ L. You cannot get stack frame information or in any fashion debug functions that were not compiled by Perl, such as those from C or C++ extensions. -If you alter your @_ arguments in a subroutine (such as with B -or B, the stack backtrace will not show the original values. +If you alter your @_ arguments in a subroutine (such as with C +or C, the stack backtrace will not show the original values. + +The debugger does not currently work in conjunction with the B<-W> +command-line switch, because it itself is not free of warnings. + +If you're in a slow syscall (like Cing, Cing, or Cing +from your keyboard or a socket) and haven't set up your own C<$SIG{INT}> +handler, then you won't be able to CTRL-C your way back to the debugger, +because the debugger's own C<$SIG{INT}> handler doesn't understand that +it needs to raise an exception to longjmp(3) out of slow syscalls.