From: reeze
Operating system:
PHP version: Irrelevant
Package: Unknown/Other Function
Bug Type: Feature/Change Request
Bug description:Display class name when debugging with gdb macro zbacktrace
Description:
------------
For example, an uncatched exception backtrace and debug_backtrace()
have class name if it's an method. but when debugging with gdb,
the macro zbacktrace and dump_bt didn't display it.
it would be easier to debug if the class name displayed
just like:
Fatal error: Uncaught exception 'Exception' with message 'NO' in
/Users/reeze/Opensource/php-test/php-src-5.4/b.php:5
Stack trace:
#0 /Users/reeze/Opensource/php-test/php-src-5.4/b.php(9): A::bar()
#1 /Users/reeze/Opensource/php-test/php-src-5.4/b.php(15): A->foo(1)
#2 /Users/reeze/Opensource/php-test/php-src-5.4/b.php(20): B->foo(1)
#3 {main}
thrown in /Users/reeze/Opensource/php-test/php-src-5.4/b.php on line 5
Test script:
---------------
<?php
class A {
static function bar() {
core_me('127.0.0.1'); // it will core
}
function foo($param) {
self::bar();
}
}
class B extends A {
function foo($param) {
parent::foo($param);
}
}
$b = new B();
$b->foo(1);
Expected result:
----------------
[0x100ca4490] core_me("127.0.0.1")
/Users/reeze/Opensource/php-test/php-src-
5.4/b.php:5
[0x100ca43a8] A::bar() /Users/reeze/Opensource/php-test/php-src-5.4/b.php:8
[0x100ca42b8] A->foo(1)
/Users/reeze/Opensource/php-test/php-src-5.4/b.php:14
[0x100ca40e8] B->foo(1)
/Users/reeze/Opensource/php-test/php-src-5.4/b.php:19
Actual result:
--------------
[0x100ca4490] core_me("127.0.0.1")
/Users/reeze/Opensource/php-test/php-src-
5.4/b.php:5
[0x100ca43a8] bar() /Users/reeze/Opensource/php-test/php-src-5.4/b.php:8
[0x100ca42b8] foo(1) /Users/reeze/Opensource/php-test/php-src-5.4/b.php:14
[0x100ca40e8] foo(1) /Users/reeze/Opensource/php-test/php-src-5.4/b.php:19
--
Edit bug report at https://bugs.php.net/bug.php?id=63188&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=63188&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=63188&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=63188&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=63188&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=63188&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=63188&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=63188&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=63188&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=63188&r=support
Expected behavior: https://bugs.php.net/fix.php?id=63188&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=63188&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=63188&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=63188&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=63188&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=63188&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=63188&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=63188&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=63188&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=63188&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=63188&r=mysqlcfg