.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Devel::bt 3pm" .TH Devel::bt 3pm "2022-06-13" "perl v5.34.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Devel::bt \- Automatic gdb backtraces on errors .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 11 \& $ perl \-d:bt \-MB \-e\*(Aq(bless \e(my $o = 0), q{B::SV})\->REFCNT\*(Aq \& #0 0x00007f9c3215ab0e in _\|_libc_waitpid (pid=, stat_loc=0x7fff4c5ffbe8, options=) at ../sysdeps/unix/sysv/linux/waitpid.c:32 \& #1 0x00007f9c319168c1 in backtrace () at bt.xs:129 \& #2 0x00007f9c319168ec in sighandler (sig=11) at bt.xs:135 \& #3 \& #4 0x00007f9c316c8ccf in XS_B_\|_SV_REFCNT (my_perl=0x151c010, cv=0x177bfb8) at B.c:3360 \& #5 0x000000000057d5a0 in Perl_pp_entersub (my_perl=0x151c010) at pp_hot.c:2882 \& #6 0x000000000051a331 in Perl_runops_debug (my_perl=0x151c010) at dump.c:2049 \& #7 0x0000000000454ab0 in S_run_body (my_perl=0x151c010, oldscope=1) at perl.c:2308 \& #8 0x0000000000453d78 in perl_run (my_perl=0x151c010) at perl.c:2233 \& #9 0x00000000004230fd in main (argc=6, argv=0x7fff4c600788, env=0x7fff4c6007c0) at perlmain.c:117 .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This module, when enabled, registers a handler for certain types of fatal errors, like segmentation faults, and, once such an error occurs, prints a debugger backtrace to standard output before exiting the program. .PP It is intended to be used to debug crashes in situations where running the failing program directly under a debugger is not possible, for example when trying to get more information from cpantesters or from users unfamiliar with gdb. .SH "HOW IT WORKS" .IX Header "HOW IT WORKS" When being imported, a signal handler for the following signals is registered: .IP "\(bu" 4 \&\f(CW\*(C`SIGILL\*(C'\fR .IP "\(bu" 4 \&\f(CW\*(C`SIGFPE\*(C'\fR .IP "\(bu" 4 \&\f(CW\*(C`SIGBUS\*(C'\fR .IP "\(bu" 4 \&\f(CW\*(C`SIGSEGV\*(C'\fR .IP "\(bu" 4 \&\f(CW\*(C`SIGTRAP\*(C'\fR .IP "\(bu" 4 \&\f(CW\*(C`SIGABRT\*(C'\fR .IP "\(bu" 4 \&\f(CW\*(C`SIGQUIT\*(C'\fR .PP Once the program causes an error that results in one of the above signals being sent to it, the signal handler will be called, and fork off a process running \&\f(CW\*(C`gdb\*(C'\fR and generating a backtrace of the running program, which will then be printed to standard output. .SH "ACKNOWLEDGEMENTS" .IX Header "ACKNOWLEDGEMENTS" This software is based on parts of \f(CW\*(C`glib\*(C'\fR, which is written by: .IP "\(bu" 4 Peter Mattis .IP "\(bu" 4 Spencer Kimball .IP "\(bu" 4 Josh MacDonald .IP "\(bu" 4 Shawn T. Amundson .IP "\(bu" 4 Jeff Garzik .IP "\(bu" 4 Raja R Harinath .IP "\(bu" 4 Tim Janik .IP "\(bu" 4 Elliot Lee .IP "\(bu" 4 Tor Lillqvist .IP "\(bu" 4 Paolo Molaro .IP "\(bu" 4 Havoc Pennington .IP "\(bu" 4 Manish Singh .IP "\(bu" 4 Owen Taylor .IP "\(bu" 4 Sebastian Wilhelmi .IP "\(bu" 4 and others .PP \&\f(CW\*(C`glib\*(C'\fR is licensed under The \s-1GNU\s0 Lesser General Public License, Version 2. .SH "AUTHOR" .IX Header "AUTHOR" Florian Ragwitz .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is Copyright (c) 2012 by Florian Ragwitz. .PP This is free software, licensed under: .PP .Vb 1 \& The GNU Lesser General Public License, Version 2.1, February 1999 .Ve