App::Stacktrace(3pm)

πŸ’– App::Stacktrace πŸ’–

okay bestie, welcome to the App::Stacktrace manual page β€” it's a User Contributed Perl Documentation page, and we're gonna get you fluent in it. it's literally a stack trace tool. that's the whole vibe. 🫢


✨ NAME ✨

App::Stacktrace β€” Stack trace πŸ¦‹

🌸 VERSION 🌸

version 0.09 β€” yes queen, we're on 0.09.

πŸ’… SYNOPSIS πŸ’…

the whole thing runs like this, one command, one vibe:

perl-stacktrace [option] pid

  -m      Prints a gdb script
  -v      Verbose debugging
  -c      Additionally, prints C stacktrace
  --help  Show this help

  --exec  exec() into gdb

so you hand it a pid, maybe some options, and it goes to work. that's it, that's the plot. 😌

πŸŽ€ DESCRIPTION πŸŽ€

perl-stacktrace prints Perl stack traces of Perl threads for a given Perl process. and for each Perl frame, the full file name and line number get printed. full receipts, no vagueness. πŸ’―

for example, a stack dump of a running perl program:

$ ps x | grep cpan
24077 pts/12   T      0:01 /usr/local/bin/perl /usr/local/bin/cpan
24093 pts/12   S+     0:00 grep cpan

$ perl-stacktrace 24077
0x00d73416 in __kernel_vsyscall ()
/usr/local/bin/cpan:11
/usr/local/lib/perl5/5.12.2/App/Cpan.pm:364
/usr/local/lib/perl5/5.12.2/App/Cpan.pm:295
/usr/local/lib/perl5/5.12.2/CPAN.pm:339
/usr/local/lib/perl5/5.12.2/Term/ReadLine.pm:198

look at that. every frame, file, and line number just lined up like a little parade. iconic behavior honestly. πŸ‘‘

🌈 API 🌈

there exists an internal API. lowkey exclusive, but you're invited. πŸ’Œ

πŸ’œ new

this accepts the following parameters by applying them through Getopt::Long. and fr fr, this is actually just a front for the script perl-stacktrace's command line handling.

App::Stacktrace->new(
    $pid,       # The process to attach to
    'm',        # Dump the generated script
    'v',        # Verbose
    'exec',     # exec() into gdb
    '--noexec', # system() into gdb
);

so: $pid is the process to attach to, 'm' dumps the generated script, 'v' is verbose, 'exec' will exec() into gdb, and '--noexec' will system() into gdb instead. two gdb entrances, pick your fighter. πŸ₯Š

πŸ¦‹ run

runs the app program as configured by the "->new(...)" method.

$obj = App::Stacktrace->new( ... );
$obj->run;

make the object, then tell it to run. main character energy, no notes. ✨


πŸ’€ heads up bestie: the flag list up top says -m, -v, -c, --help, and --exec, while the API also knows about '--noexec'. don't mix them up, okay? i'm just telling you what's written. πŸ™ˆ

and that's the page!! this little gem is perl v5.42.3, dated 2026-08-20, straight from the App::Stacktrace(3pm) manual β€” thanks for reading with me, you ate that whole thing up, no cap. πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from