SYN SYN
[p5sagit/p5-mst-13.2.git] / ext / B / B / Debug.pm
index 732169f..1327591 100644 (file)
@@ -53,24 +53,21 @@ sub B::PMOP::debug {
     printf "\top_pmnext\t0x%x\n", ${$op->pmnext};
     printf "\top_pmregexp->precomp\t%s\n", cstring($op->precomp);
     printf "\top_pmflags\t0x%x\n", $op->pmflags;
-    $op->pmshort->debug;
     $op->pmreplroot->debug;
 }
 
 sub B::COP::debug {
     my ($op) = @_;
     $op->B::OP::debug();
-    my ($filegv) = $op->filegv;
-    printf <<'EOT', $op->label, ${$op->stash}, $$filegv, $op->seq, $op->arybase, $op->line, ${$op->warnings};
+    printf <<'EOT', $op->label, $op->stashpv, $op->file, $op->seq, $op->arybase, $op->line, ${$op->warnings};
        cop_label       %s
-       cop_stash       0x%x
-       cop_filegv      0x%x
+       cop_stashpv     %s
+       cop_file        %s
        cop_seq         %d
        cop_arybase     %d
        cop_line        %d
        cop_warnings    0x%x
 EOT
-    $filegv->debug;
 }
 
 sub B::SVOP::debug {
@@ -177,12 +174,14 @@ sub B::CV::debug {
     my ($start) = $sv->START;
     my ($root) = $sv->ROOT;
     my ($padlist) = $sv->PADLIST;
+    my ($file) = $sv->FILE;
     my ($gv) = $sv->GV;
-    printf <<'EOT', $$stash, $$start, $$root, $$gv, $sv->DEPTH, $padlist, ${$sv->OUTSIDE};
+    printf <<'EOT', $$stash, $$start, $$root, $$gv, $file, $sv->DEPTH, $padlist, ${$sv->OUTSIDE};
        STASH           0x%x
        START           0x%x
        ROOT            0x%x
        GV              0x%x
+       FILE            %s
        DEPTH           %d
        PADLIST         0x%x                           
        OUTSIDE         0x%x
@@ -244,7 +243,7 @@ sub B::SPECIAL::debug {
 sub compile {
     my $order = shift;
     B::clearsym();
-    if ($order eq "exec") {
+    if ($order && $order eq "exec") {
         return sub { walkoptree_exec(main_start, "debug") }
     } else {
         return sub { walkoptree(main_root, "debug") }