com php-src: Fixed bug #72680 gdbinit print_cvs not prepa red for PHP 7: .gdbinit

From: Date: Thu, 12 Jan 2017 09:10:12 +0000
Subject: com php-src: Fixed bug #72680 gdbinit print_cvs not prepa red for PHP 7: .gdbinit
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96691@lists.php.net to get a copy of this message
Commit: 1ee1f79e27fb4006d0400b38163b2ec0786fd130 Author: Mitch Hagstrand <mhagstrand@gmail.com> Wed, 11 Jan 2017 20:57:33 -0800 Committer: Joe Watkins <krakjoe@php.net> Thu, 12 Jan 2017 09:10:12 +0000 Parents: ef42f49470c2d5a4c11aa67ebd78e43666555c53 Branches: PHP-7.0 PHP-7.1 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1ee1f79e27fb4006d0400b38163b2ec0786fd130 Log: Fixed bug #72680 gdbinit print_cvs not prepared for PHP 7 Bugs: https://bugs.php.net/72680 Changed paths: M .gdbinit Diff: diff --git a/.gdbinit b/.gdbinit index 9b04279..09faf93 100644 --- a/.gdbinit +++ b/.gdbinit @@ -29,24 +29,35 @@ document ____executor_globals end define print_cvs - ____executor_globals - set $p = $eg.current_execute_data.CVs - set $c = $eg.current_execute_data.op_array.last_var - set $v = $eg.current_execute_data.op_array.vars - set $i = 0 + if $argc == 0 + ____executor_globals + set $cv_ex_ptr = $eg.current_execute_data + else + set $cv_ex_ptr = (zend_execute_data *)$arg0 + end + set $cv_count = $cv_ex_ptr.func.op_array.last_var + set $cv = $cv_ex_ptr.func.op_array.vars + set $cv_idx = 0 + set $callFrameSize = (sizeof(zend_execute_data) + sizeof(zval) - 1) / sizeof(zval) - printf "Compiled variables count: %d\n", $c - while $i < $c - printf "%d = %s\n", $i, $v[$i].name - if $p[$i] != 0 - printzv *$p[$i] - else - printf "*uninitialized*\n" - end - set $i = $i + 1 + printf "Compiled variables count: %d\n\n", $cv_count + while $cv_idx < $cv_count + printf "[%d] '%s'\n", $cv_idx, $cv[$cv_idx].val + set $zvalue = ((zval *) $cv_ex_ptr) + $callFrameSize + $cv_idx + printzv $zvalue + set $cv_idx = $cv_idx + 1 end end +document print_cvs + Prints the compiled variables and their values. + If a zend_execute_data pointer is set this will print the compiled + variables of that scope. If no parameter is used it will use + current_execute_data for scope. + + usage: print_cvs [zend_execute_data *] +end + define dump_bt set $ex = $arg0 while $ex @@ -563,7 +574,7 @@ end document print_zstr print the length and contents of a zend string - usage: print_zstr [ptr] + usage: print_zstr <ptr> end define zbacktrace

« previous php.cvs (#96691) next »