php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #27614 backtrace information inappropriate for PHP 5
Submitted: 2004-03-16 04:50 UTC Modified: 2004-03-16 15:31 UTC
From: jan at horde dot org Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jan at horde dot org
New email:
PHP Version: OS:

 

 [2004-03-16 04:50 UTC] jan at horde dot org
Description:
------------
The instructions on http://bugs.php.net/bugs-generating-backtrace.php how to find out the function call that causes a stacktrace does not work with PHP 5.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-03-16 09:51 UTC] nlopess@php.net
Generating a backtrace for PHP 4 or 5 is the same.

http://news.php.net/article.php?group=php.internals&article=8536
 [2004-03-16 09:57 UTC] jan at horde dot org
Yes, but 

print (char *)(executor_globals.function_state_ptr->function)->common.function_name

doesn't work because executor_globals does not exist.
 [2004-03-16 09:59 UTC] derick@php.net
excutor_globals exists just fine, you really must be doing something wrong ;-)
 [2004-03-16 15:31 UTC] jan at horde dot org
Hm, when I try the described method to analyze the backtrace in http://bugs.php.net/bug.php?id=27611, I get the following:

(gdb) bt
...
#6  0x4071f478 in zend_do_fcall_handler (execute_data=0xbfe01420,
    opline=0x4181f374, op_array=0x4182052c)
    at /home/jan/cvs/php5/Zend/zend_execute.c:2781
#7  0x4071b122 in execute (op_array=0x4182052c)
    at /home/jan/cvs/php5/Zend/zend_execute.c:1339
...

(gdb) frame 7
#7  0x4071b122 in execute (op_array=0x4182052c)
    at /home/jan/cvs/php5/Zend/zend_execute.c:1339
1339                    if (EX(opline)->handler(&execute_data, EX(opline), op_array TSRMLS_CC)) {

(gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name
Address of symbol "executor_globals" is unknown.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 15:01:29 2024 UTC