Changeset 1338 in svn for trunk/bin/phpdop.phpr


Ignore:
Timestamp:
2013-07-22T06:06:39Z (2 years ago)
Author:
Xuefer
Message:

phpdop: show jumpouts/jmpins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/phpdop.phpr

    r1328 r1338  
    3333}
    3434
    35 function dump_opcodes($opcodes, $indent = '')
     35function dump_opcodes($op_array, $indent = '')
    3636{
    3737    global $decompiler;
    3838
    3939    $types = array('result' => 5, 'op1' => 20, 'op2' => 20);
    40     foreach ($decompiler->fixOpcode($opcodes) as $line => $op) {
     40    $opcodes = &$op_array['opcodes'];
     41    $decompiler->fixOpcode($opcodes);
     42    $decompiler->buildJmpInfo($op_array);
     43    foreach ($opcodes as $line => $op) {
    4144        echo $indent;
    4245        echo sprintf("%3d ", $op['lineno']);
     
    5356        }
    5457        printf("%5s", isset($op['extended_value']) ?  $op['extended_value'] : "");
     58        if (isset($op['jmpouts']) || isset($op['jmpins'])) {
     59            printf("%10s %10s"
     60                    , (isset($op['jmpouts']) ? '>' . implode(',', $op['jmpouts']) : '')
     61                    , (isset($op['jmpins']) ? '<' . implode(',', $op['jmpins']) : '')
     62                    );
     63        }
     64        if (isset($op['isCatchBegin'])) {
     65            echo 'CB';
     66        }
    5567
    5668        echo "\n";
     
    7082    echo $indent, 'function ', $name, "\n";
    7183    if (isset($op_array)) {
    72         dump_opcodes($op_array['opcodes'], "  " . $indent);
     84        dump_opcodes($op_array, "  " . $indent);
    7385    }
    7486}
     
    126138}
    127139if (isset($op_array)) {
    128     dump_opcodes($op_array['opcodes']);
     140    dump_opcodes($op_array);
    129141}
    130142
Note: See TracChangeset for help on using the changeset viewer.