Skip to content

Instantly share code, notes, and snippets.

@reeze
Created May 5, 2012 03:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reeze/2599383 to your computer and use it in GitHub Desktop.
Save reeze/2599383 to your computer and use it in GitHub Desktop.
gdb symbol problem
➜ php-src git:(PHP-5.4) ✗ gdb sapi/cli/php
GNU gdb 6.3.50-20050815 (Apple version gdb-1705) (Fri Jul 1 10:50:06 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ....... done
(gdb) b gc_zval_possible_root
Breakpoint 1 at 0x10062ddc0: file zend_gc.c, line 132.
(gdb) r -r '<?php $a=0; $a=null; gc_collect_cycles(); ?>';
Starting program: /Users/reeze/Opensource/php-src/sapi/cli/php -r '<?php $a=0; $a=null; gc_collect_cycles(); ?>';
Reading symbols for shared libraries ++++++.......................... done
Breakpoint 1, gc_zval_possible_root (zv=0x100f96b58, tsrm_ls=0x1010009b0) at zend_gc.c:132
132 if (UNEXPECTED(GC_G(free_list) != NULL &&
(gdb) printzv zv
No symbol "zend_executor_globals" in current context.
(gdb) bt
#0 gc_zval_possible_root (zv=0x100f96b58, tsrm_ls=0x1010009b0) at zend_gc.c:132
#1 0x00000001005cf355 in _zval_ptr_dtor (zval_ptr=0x7fff5fbfe820, __zend_filename=0x100bf30f8 "/Users/reeze/Opensource/php-src/main/php_variables.c", __zend_lineno=530) at zend_gc.h:183
#2 0x000000010052d69b in php_build_argv (s=0x0, track_vars_array=0x0, tsrm_ls=0x1010009b0) at php_variables.c:530
#3 0x000000010052dee6 in php_hash_environment (tsrm_ls=0x1010009b0) at php_variables.c:644
#4 0x000000010050d206 in php_request_startup (tsrm_ls=0x1010009b0) at main.c:1568
#5 0x00000001007fd5df in do_cli (argc=3, argv=0x7fff5fbff5a0, tsrm_ls=0x1010009b0) at php_cli.c:959
#6 0x00000001007ff8ae in main (argc=3, argv=0x7fff5fbff5a0) at php_cli.c:1361
(gdb) printzv zv
[0x100f96b58] (refcount=1) array(1): {
0 => [0x100f96c80] (refcount=1) string(1): "-"
}
(gdb)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment