Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 59 additions & 6 deletions lib/App/Stacktrace/perl_backtrace_raw.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#perl_backtrace_5_8_an_interp
#perl_backtrace_5_8_nothreads
#perl_backtrace_an_interp
#perl_backtrace_a_thread
#perl_backtrace_a_thread
#perl_backtrace_nothreads

set $PERL_ITHR_JOINABLE = 0
Expand Down Expand Up @@ -135,6 +135,19 @@ define perl_backtrace_an_interp
end
end
if $type == $CXt_SUB || $type == $CXt_EVAL || $type == $CXt_FORMAT
if $type == $CXt_SUB
set $type_name = "sub"
else
if $type == $CXt_EVAL
set $type_name = "eval"
else
if $type_name = $CXt_FORMAT
set $type_name = "FORMAT"
else
set $type_name = "???"
end
end
end
set $file = 0
if $DEBUG
printf "context=%#x\n", $context
Expand Down Expand Up @@ -184,7 +197,7 @@ define perl_backtrace_an_interp
set $line = 0
end
end
printf "%s:%d\n", $file, $line
printf "%s:%d (%s)\n", $file, $line, $type_name
else
if $DEBUG
printf "%d\t... # (context*){cx_type=%d}\n", $i, $type
Expand Down Expand Up @@ -353,6 +366,19 @@ define perl_backtrace_nothreads
end
end
if $type == $CXt_SUB || $type == $CXt_EVAL || $type == $CXt_FORMAT
if $type == $CXt_SUB
set $type_name = "sub"
else
if $type == $CXt_EVAL
set $type_name = "eval"
else
if $type_name = $CXt_FORMAT
set $type_name = "FORMAT"
else
set $type_name = "???"
end
end
end
set $file = 0
if $DEBUG
printf "context=%#x\n", $context
Expand Down Expand Up @@ -436,7 +462,7 @@ define perl_backtrace_nothreads
set $line = 0
end
end
printf "%s:%d\n", $file, $line
printf "%s:%d (%s)\n", $file, $line, $type_name
end
set $i = $i + 1
end
Expand Down Expand Up @@ -538,6 +564,19 @@ define perl_backtrace_5_8_an_interp
end
end
if $type == $CXt_SUB || $type == $CXt_EVAL || $type == $CXt_FORMAT
if $type == $CXt_SUB
set $type_name = "sub"
else
if $type == $CXt_EVAL
set $type_name = "eval"
else
if $type_name = $CXt_FORMAT
set $type_name = "FORMAT"
else
set $type_name = "???"
end
end
end
set $file = 0
if $DEBUG
printf "context=%#x\n", $context
Expand Down Expand Up @@ -587,7 +626,7 @@ define perl_backtrace_5_8_an_interp
set $line = 0
end
end
printf "%s:%d\n", $file, $line
printf "%s:%d (%s)\n", $file, $line, $type_name
else
if $DEBUG
printf "%d\t... # (context*){cx_type=%d}\n", $i, $type
Expand Down Expand Up @@ -678,6 +717,19 @@ define perl_backtrace_5_8_nothreads
end
end
if $type == $CXt_SUB || $type == $CXt_EVAL || $type == $CXt_FORMAT
if $type == $CXt_SUB
$type_name = "sub"
else
if $type == $CXt_EVAL
$type_name = "eval"
else
if $type_name = $CXt_FORMAT
set $type_name = "FORMAT"
else
set $type_name = "???"
end
end
end
if $DEBUG
printf "context=%#x\n", $context
if $context
Expand Down Expand Up @@ -761,7 +813,7 @@ define perl_backtrace_5_8_nothreads
set $line = 0
end
end
printf "%s:%d\n", $file, $line
printf "%s:%d (%s)\n", $file, $line, $type_name
end
set $i = $i + 1
end
Expand Down Expand Up @@ -1054,7 +1106,8 @@ define perl_backtrace_5_8_9_an_interp
set $line = 0
end
end
printf "%s:%d\n", $file, $line
printf "%s:%d (%s)\n", $file, $line, $type_name

else
if $DEBUG
printf "%d\t... # (context*){cx_type=%d}\n", $i, $type
Expand Down
75 changes: 70 additions & 5 deletions lib/App/Stacktrace/perl_backtrace_symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,27 @@ define perl_backtrace_an_interp
set $context = $cxstack[$i]
set $type = $context->cx_u.cx_subst.sbu_type & $CXTYPEMASK
if $type == $CXt_SUB || $type == $CXt_EVAL || $type == $CXt_FORMAT
if $type == $CXt_SUB
$type_name = "sub"
else
if $type == $CXt_EVAL
$type_name = "eval"
else
if $type_name = $CXt_FORMAT
type_name = "FORMAT"
else
type_name = "???"
end
end
end
set $file = 0
set $cop = $context->cx_u.cx_blk.blku_oldcop
set $file = $cop->cop_file
if $file == 0
set $file = "undef"
end
set $line = $cop->cop_line
printf "%s:%d\n", $file, $line
printf "%s:%d (%s)\n", $$file, $line, $type_name
else
if $DEBUG
printf "%d\t... # (context*){cx_type=%d}\n", $i, $type
Expand Down Expand Up @@ -99,6 +112,19 @@ define perl_backtrace_nothreads
set $context = $cxstack[$i]
set $type = $context->cx_u.cx_subst.sbu_type & $CXTYPEMASK
if $type == $CXt_SUB || $type == $CXt_EVAL || $type == $CXt_FORMAT
if $type == $CXt_SUB
$type_name = "sub"
else
if $type == $CXt_EVAL
$type_name = "eval"
else
if $type_name = $CXt_FORMAT
type_name = "FORMAT"
else
type_name = "???"
end
end
end
set $file = 0
set $cop = $context->cx_u.cx_blk.blku_oldcop
set $gv = $cop->cop_filegv
Expand All @@ -112,7 +138,7 @@ define perl_backtrace_nothreads
set $file = "undef"
end
set $line = $cop->cop_line
printf "%s:%d\n", $file, $line
printf "%s:%d (%s)\n", $$file, $line, $type_name
end
set $i = $i + 1
end
Expand All @@ -130,14 +156,27 @@ define perl_backtrace_5_8_an_interp
set $context = $cxstack[$i]
set $type = $context->cx_type & $CXTYPEMASK
if $type == $CXt_SUB || $type == $CXt_EVAL || $type == $CXt_FORMAT
if $type == $CXt_SUB
$type_name = "sub"
else
if $type == $CXt_EVAL
$type_name = "eval"
else
if $type_name = $CXt_FORMAT
type_name = "FORMAT"
else
type_name = "???"
end
end
end
set $file = 0
set $cop = $context->cx_u.cx_blk.blku_oldcop
set $file = $cop->cop_file
if ! $file
set $file = "undef"
end
set $line = $cop->cop_line
printf "%s:%d\n", $file, $line
printf "%s:%d (%s)\n", $$file, $line, $type_name
else
if $DEBUG
printf "%d\t... # (context*){cx_type=%d}\n", $i, $type
Expand All @@ -158,6 +197,19 @@ define perl_backtrace_5_8_nothreads
set $context = $cxstack[$i]
set $type = $context->cx_type & $CXTYPEMASK
if $type == $CXt_SUB || $type == $CXt_EVAL || $type == $CXt_FORMAT
if $type == $CXt_SUB
$type_name = "sub"
else
if $type == $CXt_EVAL
$type_name = "eval"
else
if $type_name = $CXt_FORMAT
type_name = "FORMAT"
else
type_name = "???"
end
end
end
set $cop = $context->cx_u.cx_blk.blku_oldcop
set $gv = $cop->cop_filegv
if $gv
Expand All @@ -171,7 +223,7 @@ define perl_backtrace_5_8_nothreads
set $file = "undef"
end
set $line = $cop->cop_line
printf "%s:%d\n", $file, $line
printf "%s:%d (%s)\n", $$file, $line, $type_name
end
set $i = $i + 1
end
Expand Down Expand Up @@ -252,14 +304,27 @@ define perl_backtrace_5_8_9_an_interp
set $context = $cxstack[$i]
set $type = $context->cx_u.cx_subst.sbu_type & $CXTYPEMASK
if $type == $CXt_SUB || $type == $CXt_EVAL || $type == $CXt_FORMAT
if $type == $CXt_SUB
$type_name = "sub"
else
if $type == $CXt_EVAL
$type_name = "eval"
else
if $type_name = $CXt_FORMAT
type_name = "FORMAT"
else
type_name = "???"
end
end
end
set $file = 0
set $cop = $context->cx_u.cx_blk.blku_oldcop
set $file = $cop->cop_file
if ! $file
set $file = "undef"
end
set $line = $cop->cop_line
printf "%s:%d\n", $file, $line
printf "%s:%d (%s)\n", $$file, $line, $type_name
else
if $DEBUG
printf "%d\t... # (context*){cx_type=%d}\n", $i, $type
Expand Down
4 changes: 2 additions & 2 deletions t/unthreaded.t
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ elsif ($pstack_pid) {
$trace,
qr{
(?:
^t/unthreaded\.t:\d+\n
^t/unthreaded\.t:\d+\s\(sub\)\n
){10}
}xm
);
Expand All @@ -66,7 +66,7 @@ elsif ($pstack_pid) {
Test::More::is( $WAITED_RC >> 8, 0, "exit(0)" );
Test::More::is( $WAITED_RC & 127, 0, "No signals" );
Test::More::is( $WAITED_RC & 128, 0, "No core dump" );

exit;
}

Expand Down