Re: cvs: pear /PECL/namazu Makefile.in README.en README.ja config.m4 php_namazu.c php_namazu.h php_namazu_globals.h /PECL/namazu/sample form.php
search.php search2.php
| From: | Markus Fischer | Date: | Wed, 09 Jan 2002 14:08:28 +0000 |
| Subject: | Re: cvs: pear /PECL/namazu Makefile.in README.en README.ja config.m4 php_namazu.c php_namazu.h php_namazu_globals.h /PECL/namazu/sample form.php search.php search2.php |
||
| References: | 1 2 | Groups: | php.pear.cvs |
| Request: | Send a blank email to pear-cvs+get-1886@lists.php.net to get a copy of this message | ||
[CC'd to Georg S., maybe you have a clue here]
On Wed, Jan 09, 2002 at 02:45:36PM +0100, Martin Jansen wrote :
> On Wed, 09 Jan 2002 13:13:29 +0100, Tomas V.V.Cox wrote:
>
> >Markus Fischer wrote:
> >>
> >> Also, when using php_error() please always expose the context
> >> of the current function, e.g.
> >>
> >> php_error(E_WARNING, "%s(): illegal foobar '%d'",
> >> get_active_function_name(TSRMLS_C), value);
> >>
> >
> >Is there a way of having that also in php space? Something like __FUNC__
> >or get_active_func() (suitable also for methods).
>
> I played around with that some time ago, but did not
> really manage. (Don't know anything of C.) I think that
> I tried
>
> zend_sprintf(get_active_function_name(TSRMLS_D))
>
> or something like that in order to get the current userland
> function, but I only got the name of the internal PHP function
> where this line was called. May be some one else with more
> knowledge of C can write such a function. (Doesn't look like
> much work.)
>
> Markus?
I'ld love to but I don't know how and if its possible to
access the current callstack of the interpreter. I know how
apd works (which has a function to throw a callstack) but it
requires to interfer with Zends zend_module API and trace the
callstack on its own with fcall_begin_handler_func_t/end (in
other words: its a zend module).
Maybe Georg can help use here?
--
Please always Cc to me when replying to me on the lists.