Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

devel::bt(3pm) [debian man page]

Devel::bt(3pm)						User Contributed Perl Documentation					    Devel::bt(3pm)

NAME
Devel::bt - Automatic gdb backtraces on errors SYNOPSIS
$ perl -d:bt -MB -e'(bless (my $o = 0), q{B::SV})->REFCNT' #0 0x00007f9c3215ab0e in __libc_waitpid (pid=<value optimized out>, stat_loc=0x7fff4c5ffbe8, options=<value optimized out>) 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 <signal handler called> #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 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. 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. HOW IT WORKS
When being imported, a signal handler for the following signals is registered: o "SIGILL" o "SIGFPE" o "SIGBUS" o "SIGSEGV" o "SIGTRAP" o "SIGABRT" o "SIGQUIT" 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 "gdb" and generating a backtrace of the running program, which will then be printed to standard output. ACKNOWLEDGEMENTS
This software is based on parts of "glib", which is written by: o Peter Mattis <petm@xcf.berkeley.edu> o Spencer Kimball <spencer@xcf.berkeley.edu> o Josh MacDonald <jmacd@xcf.berkeley.edu> o Shawn T. Amundson <amundson@gimp.org> o Jeff Garzik <jgarzik@pobox.com> o Raja R Harinath <harinath@cs.umn.edu> o Tim Janik <timj@gtk.org> o Elliot Lee <sopwith@redhat.com> o Tor Lillqvist <tml@iki.fi> o Paolo Molaro <lupus@debian.org> o Havoc Pennington <hp@pobox.com> o Manish Singh <yosh@gimp.org> o Owen Taylor <otaylor@gtk.org> o Sebastian Wilhelmi <wilhelmi@ira.uka.de> o and others "glib" is licensed under The GNU Lesser General Public License, Version 2. AUTHOR
Florian Ragwitz <rafl@debian.org> COPYRIGHT AND LICENSE
This software is Copyright (c) 2010 by Florian Ragwitz. This is free software, licensed under: The GNU Lesser General Public License, Version 2.1, February 1999 perl v5.14.2 2010-09-08 Devel::bt(3pm)

Check Out this Related Man Page

Devel::Dumpvar(3pm)					User Contributed Perl Documentation				       Devel::Dumpvar(3pm)

NAME
Devel::Dumpvar - A pure-OO reimplementation of dumpvar.pl SYNOPSIS
use Devel::Dumpvar; # Dump something immediately to STDOUT Devel::Dumpvar->dump( [ 'foo' ], $bar' ); # Create a dump handle to use repeatedly my $Dump = Devel::Dumpvar->new; # Dump via the handler $Dump->dump( 'foo', [ 'bar' ] ); DESCRIPTION
Most perl dumping modules are focused on serializing data structures into a format that can be rebuilt into the original data structure. They do this with a variety of different focuses, such as human readability, the ability to execute the dumped code directly, or to minimize the size of the dumped data. Excect for the one contained in the debugger, in the file dumpvar.pl. This is a much more human-readable form, highly useful for debugging, containing a lot of extra information without the burden of needing to allow the dump to be re-assembled into the original data. The main downside of the dumper in the perl-debugger is that the dumpvar.pl script is not really a readily loadable and useable module. It has dedicated hooks from and to the debugger, and spans across multiple namespaces, including main::. Devel::Dumpvar is a pure object-orientated reimplementation of the same functionality. This makes it much more versatile version to use for dumping information to debug log files or other uses where you don't need to reassemble the data. METHODS
new( option => value, ... ) The "new" constructor creates a new dumping object. Any options can be passed a list of key/value pairs. Each option passed to the constructor is set via one of the option methods below. to( $output_destination ) The "to" option specifies where the output is to be sent to. When undefined, output will go to STDOUT. The output destination can be either a handle object ( or anything else with a ->print method ), or the string 'return', which will cause the "dump" method to collect and return the dump results for each call, rather than printing it immediately to the output. If called without an argument, returns the current value. If called with an argument, returns true or dies on error. dump( data1, data2, ... ) If called as an object method, dumps a number of data values or structs to the dumping object. If called as a class method, creates a new default dump object and immediately dumps to it, destroying the dumper afterwards. TO DO
- Implement options currently available in other dumpers as needed. - Currently only supports SCALAR, REF, ARRAY, HASH and Regexp. Add support for all possible reference types. SUPPORT
Bugs should be reported via the CPAN bug tracker at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Devel-Dumpvar <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Devel-Dumpvar> For other issues, or commercial enhancement or support, contact the author. AUTHORS
Adam Kennedy <adamk@cpan.org> COPYRIGHT
Copyright 2004 - 2010 Adam Kennedy. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.12.4 2010-01-18 Devel::Dumpvar(3pm)
Man Page