Edit report at https://bugs.php.net/bug.php?id=63188&edit=1
ID: 63188 Updated by: re...@php.net Reported by: re...@php.net Summary: Display class name when debugging with gdb macro zbacktrace Status: Open Type: Feature/Change Request Package: Unknown/Other Function PHP Version: Irrelevant Block user comment: N Private report: N New Comment: Hi Laruence, 1. Hmm, it is, if build with zts zbacktrace need running process, I know it's another problem:) dump_bt didn't before, that could be fixed I will update that to not require running process. 2. It would be easier to debug, such as test script, if there are inherent or the same function/method name, method's backtrace are the same as normal function. if there are class name, we will not need to check them one by one:) Previous Comments: ------------------------------------------------------------------------ [2012-09-30 15:51:45] larue...@php.net 1. it's not a good idea to make 'zbacktrace' require a running process. 2. and why need this? there are file/line/method already ------------------------------------------------------------------------ [2012-09-29 19:22:04] re...@php.net A patch was sent here: https://github.com/php/php-src/pull/209 ------------------------------------------------------------------------ [2012-09-29 19:17:14] re...@php.net 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 this bug report at https://bugs.php.net/bug.php?id=63188&edit=1