[PHP-CVS] cvs: php-src / .gdbinit
helly Sun Jan 4 15:20:02 2009 UTC Modified files: /php-src.gdbinit Log: - Add compiler globals as http://cvs.php.net/viewvc.cgi/php-src/.gdbinit?r1=1.24r2=1.25diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.24 php-src/.gdbinit:1.25 --- php-src/.gdbinit:1.24 Sat Jan 3 12:18:53 2009 +++ php-src/.gdbinitSun Jan 4 15:20:02 2009 @@ -2,13 +2,16 @@ if basic_functions_module.zts set $tsrm_ls = ts_resource_ex(0, 0) set $eg = ((zend_executor_globals) (*((void ***) $tsrm_ls))[executor_globals_id-1]) + set $cg = ((zend_compiler_globals) (*((void ***) $tsrm_ls))[compiler_globals_id-1]) else set $eg = executor_globals + set $cg = compiler_globals end end document executor_globals portable way of accessing executor_globals, set $eg + this also sets compiler_globals to $cg ZTS detection is automatically based on ext/standard module struct end -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / .gdbinit
helly Sat Jan 3 12:18:54 2009 UTC Modified files: /php-src.gdbinit Log: - There is no -v in keys http://cvs.php.net/viewvc.cgi/php-src/.gdbinit?r1=1.23r2=1.24diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.23 php-src/.gdbinit:1.24 --- php-src/.gdbinit:1.23 Sun Aug 10 22:18:58 2008 +++ php-src/.gdbinitSat Jan 3 12:18:53 2009 @@ -316,7 +316,7 @@ end else printf \ - printt $unicode $p-key.arKey.v $p-nKeyLength + printt $unicode $p-key.arKey.u $p-nKeyLength printf \ = end else -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / .gdbinit
helly Sun Aug 10 22:18:59 2008 UTC Modified files: /php-src.gdbinit Log: - Improve gdb support # I was actually debugging and trying to solve memleaks a hell lot http://cvs.php.net/viewvc.cgi/php-src/.gdbinit?r1=1.22r2=1.23diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.22 php-src/.gdbinit:1.23 --- php-src/.gdbinit:1.22 Sun Jul 13 21:26:53 2008 +++ php-src/.gdbinitSun Aug 10 22:18:58 2008 @@ -91,6 +91,58 @@ prints zval contents end +define printu + set $str = (UChar*)$arg0 + if $arg1 0 + set $max = $arg1 + else + set $max = 1024 + end + set $pos = 0 + while $pos $max *(char*)(($str+$pos)) + if $str[$pos] 256 + printf %c, $str[$pos] + else + printf \\u%04X, $str[$pos] + end + set $pos = $pos + 1 + end + if $pos $max *((char*)($str+$pos)) + printf [...] + end +end + +document printu + prints a unicode string, optionally with given length + usage: printu str [len] + The function stops at the first zero byte (not char) or when len is reached. + If len is less than or equal to one then a maximum of 1024 characters are + printed. +end + +define printt + if $arg0 + printu $arg1 $arg2 + else + set $len = strlen($arg1) + if $arg2 0 $len $arg2 + set $copy = strdup($arg1) + printf %p: %s\n, $copy, $copy + set ((char*)$copy)[$arg2] = 0 + printf %s[...], $copy + call free($copy) + else + printf %s, $arg1 + end + end +end + +document printt + prints a binary or unicode string, optionally with given length + usage: printt unicode str [len] + If unicode is 1 the function calls printu, else it uses printf. +end + define printzv_contents set $zvalue = $arg0 set $type = $zvalue-type @@ -182,19 +234,7 @@ end if $type == 10 printf (%d): [%p]: \, $zvalue-value.str.len, $zvalue-value.str.val - set $pos = 0 - while $pos 20 $pos $zvalue-value.str.len - if $zvalue-value.ustr.val[$pos] 256 - printf %c, $zvalue-value.ustr.val[$pos] - else - printf \\u%04X, $zvalue-value.ustr.val[$pos] - end - set $pos = $pos + 1 - end - printf \ - if $pos $zvalue-value.str.len - printf [...] - end + printu $zvalue-value.ustr.val $zvalue-value.str.len end if $type 10 end @@ -254,6 +294,7 @@ set $ht = $arg0 set $obj = $arg1 set $p = $ht-pListHead + set $unicode = $ht-unicode while $p != 0 set $i = $ind @@ -274,7 +315,9 @@ printf \private %s::%s\ = , $p-key.arKey.s+1, $p-key.arKey.s+$n+1 end else - printf \%s\ = , $p-key.arKey.s + printf \ + printt $unicode $p-key.arKey.v $p-nKeyLength + printf \ = end else printf %d = , $p-h @@ -297,7 +340,7 @@ define print_ht set $ind = 1 - printf [0x%08x] {\n, $arg0 + printf [0x%08x] (%d) {\n, $arg0, $arg0-nNumOfElements print_ht $arg0 0 1 printf }\n end @@ -308,7 +351,7 @@ define print_htptr set $ind = 1 - printf [0x%08x] {\n, $arg0 + printf [0x%08x] (%d) {\n, $arg0, $arg0-nNumOfElements print_ht $arg0 0 0 printf }\n end @@ -319,7 +362,7 @@ define print_htstr set $ind = 1 - printf [0x%08x] {\n, $arg0 + printf [0x%08x] (%d) {\n, $arg0, $arg0-nNumOfElements print_ht $arg0 0 2 printf }\n end @@ -331,6 +374,7 @@ define print_ft set $ht = $arg0 set $p = $ht-pListHead + set $unicode = $ht-unicode while $p != 0 set $func = (zend_function*)$p-pData @@ -342,19 +386,40 @@ end if $p-nKeyLength 0 - printf \%s\ = , $p-key.arKey.s + printf \ + printt $unicode $p-key.arKey.u $p-nKeyLength + printf \ = else printf %d = , $p-h end - - printf \%s\\n, $func-common.function_name + printf [%p]: , $func + if
[PHP-CVS] cvs: php-src / .gdbinit
helly Sun Jul 13 21:26:53 2008 UTC Modified files: /php-src.gdbinit Log: - Improve/fix debugging experience http://cvs.php.net/viewvc.cgi/php-src/.gdbinit?r1=1.21r2=1.22diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.21 php-src/.gdbinit:1.22 --- php-src/.gdbinit:1.21 Sun May 20 21:45:58 2007 +++ php-src/.gdbinitSun Jul 13 21:26:53 2008 @@ -95,8 +95,8 @@ set $zvalue = $arg0 set $type = $zvalue-type - printf (refcount=%d, $zvalue-refcount - if $zvalue-is_ref + printf (refcount=%d, $zvalue-refcount__gc + if $zvalue-is_ref__gc printf ,is_ref end printf ) @@ -181,7 +181,20 @@ if $type == 9 end if $type == 10 - printf (%d): [%p], $zvalue-value.str.len, $zvalue-value.str.val + printf (%d): [%p]: \, $zvalue-value.str.len, $zvalue-value.str.val + set $pos = 0 + while $pos 20 $pos $zvalue-value.str.len + if $zvalue-value.ustr.val[$pos] 256 + printf %c, $zvalue-value.ustr.val[$pos] + else + printf \\u%04X, $zvalue-value.ustr.val[$pos] + end + set $pos = $pos + 1 + end + printf \ + if $pos $zvalue-value.str.len + printf [...] + end end if $type 10 end -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / .gdbinit
helly Thu Feb 8 15:28:43 2007 UTC Modified files: /php-src.gdbinit Log: - Show whether a zval is a reference in printzv user command http://cvs.php.net/viewvc.cgi/php-src/.gdbinit?r1=1.19r2=1.20diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.19 php-src/.gdbinit:1.20 --- php-src/.gdbinit:1.19 Mon May 22 19:43:15 2006 +++ php-src/.gdbinitThu Feb 8 15:28:43 2007 @@ -95,7 +95,11 @@ set $zvalue = $arg0 set $type = $zvalue-type - printf (refcount=%d) , $zvalue-refcount + printf (refcount=%d, $zvalue-refcount + if $zvalue-is_ref + printf ,is_ref + end + printf ) if $type == 0 printf NULL end -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / .gdbinit
helly Mon May 22 19:43:15 2006 UTC Modified files: /php-src.gdbinit Log: - Provide user func printztype to retrieve the name of a zval type http://cvs.php.net/viewcvs.cgi/php-src/.gdbinit?r1=1.18r2=1.19diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.18 php-src/.gdbinit:1.19 --- php-src/.gdbinit:1.18 Sat May 20 12:44:46 2006 +++ php-src/.gdbinitMon May 22 19:43:15 2006 @@ -33,13 +33,62 @@ dumps the current execution stack. usage: dump_bt executor_globals.current_execute_data end +define printztype + printz_type $arg0 + printf \n +end + +document printztype + prints the type name of a zval type +end + +define printz_type + set $type = $arg0 + if $type == 0 + printf NULL + end + if $type == 1 + printf long + end + if $type == 2 + printf double + end + if $type == 3 + printf bool + end + if $type == 4 + printf array + end + if $type == 5 + printf object + end + if $type == 6 + printf string + end + if $type == 7 + printf resource + end + if $type == 8 + printf constant + end + if $type == 9 + printf const_array + end + if $type == 10 + printf unicode string + end + if $type 10 + printf unknown type %d, $type + end +end + define printzv set $ind = 1 printzv $arg0 0 end document printzv - prints content of zval + prints zval contents end define printzv_contents @@ -50,22 +99,22 @@ if $type == 0 printf NULL end + printz_type $type if $type == 1 - printf long: %ld, $zvalue-value.lval + printf : %ld, $zvalue-value.lval end if $type == 2 - printf double: %lf, $zvalue-value.dval + printf : %lf, $zvalue-value.dval end if $type == 3 - printf bool: if $zvalue-value.lval - printf true + printf : true else - printf false + printf : false end end if $type == 4 - printf array(%d): , $zvalue-value.ht-nNumOfElements + printf (%d): , $zvalue-value.ht-nNumOfElements if ! $arg1 printf {\n set $ind = $ind + 1 @@ -81,7 +130,6 @@ set $type = 0 end if $type == 5 - printf object executor_globals set $handle = $zvalue-value.obj.handle set $handlers = $zvalue-value.obj.handlers @@ -119,22 +167,19 @@ set $type = 0 end if $type == 6 - printf string(%d): \%s\, $zvalue-value.str.len, $zvalue-value.str.val + printf (%d): \%s\, $zvalue-value.str.len, $zvalue-value.str.val end if $type == 7 - printf resource: #%d, $zvalue-value.lval + printf : #%d, $zvalue-value.lval end if $type == 8 - printf constant end if $type == 9 - printf const_array end if $type == 10 - printf unicode string(%d): [%p], $zvalue-value.str.len, $zvalue-value.str.val + printf (%d): [%p], $zvalue-value.str.len, $zvalue-value.str.val end if $type 10 - printfunknown type %d, $type end printf \n end -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / .gdbinit
helly Sat May 20 12:44:46 2006 UTC Modified files: /php-src.gdbinit Log: - In printzv show private/protected visibility and class in case of private http://cvs.php.net/viewcvs.cgi/php-src/.gdbinit?r1=1.17r2=1.18diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.17 php-src/.gdbinit:1.18 --- php-src/.gdbinit:1.17 Mon Mar 13 22:54:05 2006 +++ php-src/.gdbinitSat May 20 12:44:46 2006 @@ -69,7 +69,7 @@ if ! $arg1 printf {\n set $ind = $ind + 1 - print_ht $zvalue-value.ht + print_ht $zvalue-value.ht 0 set $ind = $ind - 1 set $i = $ind while $i 0 @@ -103,7 +103,7 @@ printf (%d): , $ht-nNumOfElements printf {\n set $ind = $ind + 1 - print_ht $ht + print_ht $ht 1 set $ind = $ind - 1 set $i = $ind while $i 0 @@ -190,6 +190,7 @@ define print_ht set $ht = $arg0 + set $obj = $arg1 set $p = $ht-pListHead while $p != 0 @@ -201,8 +202,20 @@ set $i = $i - 1 end - if $p-nKeyLength 0 - printf \%s\ = , $p-key.arKey.s + if $p-nKeyLength 0 + if $obj $p-key.arKey.s[0] == 0 + if $p-key.arKey.s[1] == '*' + printf \protected %s\ = , $p-key.arKey.s+3 + else + set $n = 1 + while $n $p-nKeyLength $p-key.arKey.s[$n] != 0 + set $n = $n + 1 + end + printf \private %s::%s\ = , $p-key.arKey.s+1, $p-key.arKey.s+$n+1 + end + else + printf \%s\ = , $p-key.arKey.s + end else printf %d = , $p-h end @@ -215,7 +228,7 @@ define print_ht set $ind = 1 printf [0x%08x] {\n, $arg0 - print_ht $arg0 + print_ht $arg0 0 printf }\n end -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / .gdbinit
helly Mon Mar 13 22:54:05 2006 UTC Modified files: /php-src.gdbinit Log: - Cleanup http://cvs.php.net/viewcvs.cgi/php-src/.gdbinit?r1=1.16r2=1.17diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.16 php-src/.gdbinit:1.17 --- php-src/.gdbinit:1.16 Wed Mar 8 23:37:41 2006 +++ php-src/.gdbinitMon Mar 13 22:54:05 2006 @@ -48,7 +48,7 @@ printf (refcount=%d) , $zvalue-refcount if $type == 0 - printf NULL: + printf NULL end if $type == 1 printf long: %ld, $zvalue-value.lval @@ -202,7 +202,7 @@ end if $p-nKeyLength 0 - printf \%s\ = , (char*)$p-key.arKey.s + printf \%s\ = , $p-key.arKey.s else printf %d = , $p-h end @@ -237,7 +237,7 @@ end if $p-nKeyLength 0 - printf \%s\ = , (char*)$p-key.arKey.s + printf \%s\ = , $p-key.arKey.s else printf %d = , $p-h end -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / .gdbinit
helly Wed Mar 8 22:15:52 2006 UTC Modified files: /php-src.gdbinit Log: - Automatic TSRM/ZTS detection http://cvs.php.net/viewcvs.cgi/php-src/.gdbinit?r1=1.13r2=1.14diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.13 php-src/.gdbinit:1.14 --- php-src/.gdbinit:1.13 Sun Jan 22 21:46:47 2006 +++ php-src/.gdbinitWed Mar 8 22:15:52 2006 @@ -1,7 +1,5 @@ -set $zts = 0 - define executor_globals - if $zts + if basic_functions_module.zts set $eg = ((zend_executor_globals) (*((void ***) tsrm_ls))[executor_globals_id-1]) else set $eg = executor_globals @@ -10,7 +8,7 @@ document executor_globals portable way of accessing executor_globals - type set $zts = 1 if you use --enable-maintainer-zts on your configure line + ZTS detection is automatically based on ext/standard module struct end define dump_bt -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / .gdbinit
helly Wed Mar 8 22:38:32 2006 UTC Modified files: /php-src.gdbinit Log: - Automatic tsrm key fetching http://cvs.php.net/viewcvs.cgi/php-src/.gdbinit?r1=1.14r2=1.15diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.14 php-src/.gdbinit:1.15 --- php-src/.gdbinit:1.14 Wed Mar 8 22:15:52 2006 +++ php-src/.gdbinitWed Mar 8 22:38:32 2006 @@ -1,6 +1,7 @@ define executor_globals if basic_functions_module.zts - set $eg = ((zend_executor_globals) (*((void ***) tsrm_ls))[executor_globals_id-1]) + set $tsrm_ls = ts_resource_ex(0, 0) + set $eg = ((zend_executor_globals) (*((void ***) $tsrm_ls))[executor_globals_id-1]) else set $eg = executor_globals end -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / .gdbinit
helly Wed Mar 8 23:37:42 2006 UTC Modified files: /php-src.gdbinit Log: - Fix a bunch of issues, now the classname and the properties of objects are shown correctly (though standard object handlers are assumed and tested for) http://cvs.php.net/viewcvs.cgi/php-src/.gdbinit?r1=1.15r2=1.16diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.15 php-src/.gdbinit:1.16 --- php-src/.gdbinit:1.15 Wed Mar 8 22:38:32 2006 +++ php-src/.gdbinitWed Mar 8 23:37:41 2006 @@ -44,32 +44,32 @@ define printzv_contents set $zvalue = $arg0 - set $type = $zvalue.type + set $type = $zvalue-type - printf (refcount=%d) , $zvalue.refcount + printf (refcount=%d) , $zvalue-refcount if $type == 0 printf NULL: end if $type == 1 - printf long: %ld, $zvalue.value.lval + printf long: %ld, $zvalue-value.lval end if $type == 2 - printf double: %lf, $zvalue.value.dval + printf double: %lf, $zvalue-value.dval end if $type == 3 printf bool: - if $zvalue.value.lval + if $zvalue-value.lval printf true else printf false end end if $type == 4 - printf array(%d): , $zvalue.value.ht-nNumOfElements + printf array(%d): , $zvalue-value.ht-nNumOfElements if ! $arg1 printf {\n set $ind = $ind + 1 - print_ht $zvalue.value.ht + print_ht $zvalue-value.ht set $ind = $ind - 1 set $i = $ind while $i 0 @@ -84,36 +84,45 @@ printf object executor_globals set $handle = $zvalue-value.obj.handle - set $zobj = (zend_object *)$eg-objects_store.object_buckets[$handle].bucket.obj.object - printf (%s) #%d, $zobj-ce-name, $handle + set $handlers = $zvalue-value.obj.handlers + if basic_functions_module.zts + set $zobj = zend_objects_get_address($zvalue, $tsrm_ls) + else + set $zobj = zend_objects_get_address($zvalue) + end + if $handlers-get_class_entry == zend_std_object_get_class + set $cname = $zobj-ce.name.s + else + set $cname = Unknown + end + printf (%s) #%d, $cname, $handle if ! $arg1 - printf (prop examination disabled due to a gdb bug) -# if $zvalue.value.obj.handlers-get_properties -# set $ht = $zvalue-value.obj.handlers-get_properties($zvalue) -# if $ht -# printf (%d): $ht-nNumOfElements -# 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 } -# else -# echo no properties found -# end -# end + if $handlers-get_properties == zend_std_get_properties + set $ht = $zobj-properties + if $ht + printf (%d): , $ht-nNumOfElements + 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 } + else + echo no properties found + end + end end set $type = 0 end if $type == 6 - printf string(%d): \%s\, $zvalue.value.str.len, $zvalue.value.str.val + printf string(%d):
[PHP-CVS] cvs: php-src / .gdbinit
helly Sun Jan 22 21:45:38 2006 UTC Modified files: /php-src.gdbinit Log: - Fix for head and add a bit more info http://cvs.php.net/viewcvs.cgi/php-src/.gdbinit?r1=1.11r2=1.12diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.11 php-src/.gdbinit:1.12 --- php-src/.gdbinit:1.11 Mon Jan 9 07:48:19 2006 +++ php-src/.gdbinitSun Jan 22 21:45:38 2006 @@ -44,51 +44,29 @@ end define printzv_contents - executor_globals set $zvalue = $arg0 + set $type = $zvalue.type - if $zvalue.type == 0 - set $typename = NULL - end - if $zvalue.type == 1 - set $typename = long - end - if $zvalue.type == 2 - set $typename = double - end - if $zvalue.type == 3 - set $typename = string - end - if $zvalue.type == 4 - set $typename = array - end - if $zvalue.type == 5 - set $typename = object - end - if $zvalue.type == 6 - set $typename = bool + printf (refcount=%d) , $zvalue.refcount + if $type == 0 + printf NULL: end - if $zvalue.type == 7 - set $typename = resource + if $type == 1 + printf long: %ld, $zvalue.value.lval end - if $zvalue.type == 8 - set $typename = constant + if $type == 2 + printf double: %lf, $zvalue.value.dval end - if $zvalue.type == 9 - set $typename = const_array - end - - printf (refcount=%d) %s: , $zvalue.refcount, $typename - if $zvalue.type == 1 - printf %ld, $zvalue.value.lval - end - if $zvalue-type == 2 - printf %lf, $zvalue.value.dval - end - if $zvalue.type == 3 - printf \%s\(%d), $zvalue.value.str.val, $zvalue.value.str.len + if $type == 3 + printf bool: + if $zvalue.value.lval + printf true + else + printf false + end end - if $zvalue.type == 4 + if $type == 4 + printf array(%d): , $zvalue.value.ht-nNumOfElements if ! $arg1 printf {\n set $ind = $ind + 1 @@ -101,34 +79,54 @@ end printf } end + set $type = 0 end - if $zvalue.type == 5 + if $type == 5 + printf object + executor_globals + set $handle = $zvalue-value.obj.handle + set $zobj = (zend_object *)$eg-objects_store.object_buckets[$handle].bucket.obj.object + printf (%s) #%d, $zobj-ce-name, $handle if ! $arg1 printf (prop examination disabled due to a gdb bug) - if $zvalue.value.obj.handlers-get_properties +# 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 +# if $ht +# printf (%d): $ht-nNumOfElements +# 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 } +# else +# echo no properties found # end -# printf } end end + set $type = 0 end - if $zvalue.type == 6 - if $zvalue.value.lval - printf true - else - printf false - end + if $type == 6 + printf string(%d): \%s\, $zvalue.value.str.len, $zvalue.value.str.val + end + if $type == 7 + printf resource: #%d, $zvalue.value.lval + end + if $type == 8 + printf constant + end
[PHP-CVS] cvs: php-src / .gdbinit
helly Sun Jan 22 21:46:47 2006 UTC Modified files: /php-src.gdbinit Log: - Hmm one more # is needed http://cvs.php.net/viewcvs.cgi/php-src/.gdbinit?r1=1.12r2=1.13diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.12 php-src/.gdbinit:1.13 --- php-src/.gdbinit:1.12 Sun Jan 22 21:45:38 2006 +++ php-src/.gdbinitSun Jan 22 21:46:47 2006 @@ -106,7 +106,7 @@ # else # echo no properties found # end - end +# end end set $type = 0 end -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / .gdbinit
helly Mon Jan 9 07:48:19 2006 UTC Modified files: /php-src.gdbinit Log: Add print_ft to dump function tables (lists the names) http://cvs.php.net/viewcvs.cgi/php-src/.gdbinit?r1=1.10r2=1.11diff_format=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.10 php-src/.gdbinit:1.11 --- php-src/.gdbinit:1.10 Mon Feb 16 20:20:55 2004 +++ php-src/.gdbinitMon Jan 9 07:48:19 2006 @@ -165,7 +165,7 @@ end if $p-nKeyLength 0 - printf \%s\ = , $p-arKey + printf \%s\ = , $p-key.u.string else printf %d = , $p-h end @@ -196,7 +196,7 @@ end if $p-nKeyLength 0 - printf \%s\ = , $p-arKey + printf \%s\ = , (char*)$p-key.u.string else printf %d = , $p-h end @@ -217,6 +217,41 @@ dumps elements of HashTable made of zval end +define print_ft + set $ht = $arg0 + set $p = $ht-pListHead + + while $p != 0 + set $func = (zend_function*)$p-pData + + set $i = $ind + while $i 0 + printf + set $i = $i - 1 + end + + if $p-nKeyLength 0 + printf \%s\ = , (char*)$p-key.u.string + else + printf %d = , $p-h + end + + printf \%s\\n, $func-common.function_name + set $p = $p-pListNext + end +end + +define print_ft + set $ind = 1 + printf [0x%08x] {\n, $arg0 + print_ft $arg0 + printf }\n +end + +document print_ft + dumps a function table (HashTable) +end + define printzn executor_globals set $ind = 0 -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-CVS] cvs: php-src / .gdbinit
moriyoshi Mon Feb 16 15:20:56 2004 EDT Modified files: /php-src.gdbinit Log: - Add zbacktrace user-defined command. http://cvs.php.net/diff.php/php-src/.gdbinit?r1=1.9r2=1.10ty=u Index: php-src/.gdbinit diff -u php-src/.gdbinit:1.9 php-src/.gdbinit:1.10 --- php-src/.gdbinit:1.9Mon May 5 07:43:50 2003 +++ php-src/.gdbinitMon Feb 16 15:20:55 2004 @@ -273,6 +273,18 @@ dump operands of the current opline end +define zbacktrace + executor_globals + dump_bt $eg.current_execute_data +end + +document zbacktrace + prints backtrace. + This command is almost a short cut for +(gdb) executor_globals +(gdb) dump_bt $eg.current_execute_data +end + define zmemcheck set $p = alloc_globals.head set $stat = ? @@ -345,4 +357,3 @@ usage: zmemcheck [ptr]. if ptr is 0, all blocks will be listed. end - -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php