Re: Stacktrace in errormessages
| From: | Ragnar Kjørstad | Date: | Sat, 18 Nov 2000 23:58:36 +0000 |
| Subject: | Re: Stacktrace in errormessages | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-38479@lists.php.net to get a copy of this message | ||
On Sun, Oct 29, 2000 at 06:34:04PM +0200, Zeev Suraski wrote:
> >If no, could you give me some hints to where this stack should be
> >modified?
> >
> >I'll try to add the feature - even if you don't think it belongs in the
> >php distribution it will be a nice feature for us and possible others.
> >(Or if you choose, you can add it with a compile-option).
>
> Well, it'd have to be added to the execute() code.
OK, now it kind of works :-)
However, I still have a few problems:
* Memory managment - how to free data-structures
* will FREE_ZVAL() free the content too, if I free an array?
* does zend_stack_del_top() free the content properly? e.g. if it's
an object?
* How does the reference-counter system work?
* How do I create complex datastructures?
I found out how to build an array (I think :-) ), but not
how to put an array into an array and so on.
I'll be greatful for any pointers to documentation (I browsed zend.org
but could not find answers to theese questions) or answers to theese
specific questions.
Once I find out how to do this, I'm going to:
* add function arguments to the stack-trace
* modify the internal error-handler to print the stack-trace
* add an #ifdef or configuration-switch
> As I said, though, we
> don't want to add it because it'll significantly reduce function call
> performance.
OK, I'll just maintain it as a seperate patch then.
BTW: How do you benchmark this? Run a profiler on the cgi-version of php?
Run apachebench on a php-webpage? Any other ways?
Thanks
--
Ragnar Kjørstad
Modus Media