cvs: php4 / .gdbinit

From: Date: Sun, 06 Apr 2003 20:19:52 +0000
Subject: cvs: php4 / .gdbinit
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-20144@lists.php.net to get a copy of this message
helly Sun Apr 6 16:19:52 2003 EDT Modified files: /php4 .gdbinit Log: Support for ZTS Index: php4/.gdbinit diff -u php4/.gdbinit:1.5 php4/.gdbinit:1.6 --- php4/.gdbinit:1.5 Sun Apr 6 14:40:19 2003 +++ php4/.gdbinit Sun Apr 6 16:19:52 2003 @@ -1,6 +1,21 @@ +set $zts = 0 + +define ____executor_globals + if $zts + set $eg = ((zend_executor_globals) (*((void ***) tsrm_ls))[executor_globals_id-1]) + else + set $eg = executor_globals + end +end + +document ____executor_globals + portable way of accessing executor_globals + type "set $zts = 1" if you use --enable-maintainer-zts on your configure line +end + define dump_bt - set $t = $arg0 - while $t + set $t = $arg0 + while $t printf "[0x%08x] ", $t if $t->function_state.function->common.function_name printf "%s() ", $t->function_state.function->common.function_name @@ -12,7 +27,7 @@ end set $t = $t->prev_execute_data printf "\n" - end + end end document dump_bt @@ -29,6 +44,7 @@ end define ____printzv + ____executor_globals set $zvalue = $arg0 if $zvalue->type == 0 @@ -64,7 +80,7 @@ printf "[0x%08x] ", $zvalue - if $zvalue == executor_globals.uninitialized_zval_ptr + if $zvalue == $eg.uninitialized_zval_ptr printf "*uninitialized* " end printf "(refcount=%d) %s: ", $zvalue->refcount, $typename @@ -94,17 +110,19 @@ if $zvalue->type == 5 if ! $arg1 printf "(prop examination disabled due to a gdb bug)" -# set $ht = $zvalue->value.obj.handlers->get_properties($zvalue) -# printf "{\n" -# set $ind = $ind + 1 -# ____print_ht $ht -# set $ind = $ind - 1 -# set $i = $ind -# while $i > 0 -# printf " " -# set $i = $i - 1 -# end -# printf "}" + if $zvalue->value.obj.handlers->get_properties +# set $ht = $zvalue->value.obj.handlers->get_properties($zvalue) +# printf "{\n" +# set $ind = $ind + 1 +# ____print_ht $ht +# set $ind = $ind - 1 +# set $i = $ind +# while $i > 0 +# printf " " +# set $i = $i - 1 +# end +# printf "}" + end end end if $zvalue->type == 6 @@ -156,6 +174,7 @@ end define printzn + ____executor_globals set $ind = 0 set $znode = $arg0 if $znode->op_type == 1 @@ -179,12 +198,12 @@ end if $znode->op_type == 2 printf ": " - set $tvar = (union _temp_variable *)((char *)executor_globals.current_execute_data->Ts + $znode->u.var) + set $tvar = (union _temp_variable *)((char *)$eg.current_execute_data->Ts + $znode->u.var) ____printzv ((union _temp_variable *)$tvar)->tmp_var end if $znode->op_type == 4 printf ": " - set $tvar = (union _temp_variable *)((char *)executor_globals.current_execute_data->Ts + $znode->u.var) + set $tvar = (union _temp_variable *)((char *)$eg.current_execute_data->Ts + $znode->u.var) ____printzv *$tvar->var.ptr_ptr end if $znode->op_type == 8

« previous php.cvs (#20144) next »