/* PHP DTrace probes {{{ */
static inline const char *dtrace_get_executed_filename(TSRMLS_D)
{
- if (EG(current_execute_data) && EG(current_execute_data)->op_array) {
- return EG(current_execute_data)->op_array->filename;
+ zend_execute_data *ex = EG(current_execute_data);
+
+ while (ex && (!ex->func || !ZEND_USER_CODE(ex->func->type))) {
+ ex = ex->prev_execute_data;
+ }
+ if (ex) {
+ return ex->func->op_array.filename->val;
} else {
return zend_get_executed_filename(TSRMLS_C);
}
{
#ifdef HAVE_DTRACE
if (DTRACE_EXCEPTION_THROWN_ENABLED()) {
- const char *classname;
- zend_uint name_len;
+ zend_string *classname;
if (exception != NULL) {
- zend_get_object_classname(Z_OBJ_P(exception), &classname, &name_len TSRMLS_CC);
- DTRACE_EXCEPTION_THROWN((char *)classname);
+ classname = zend_get_object_classname(Z_OBJ_P(exception) TSRMLS_CC);
+ DTRACE_EXCEPTION_THROWN(classname->val);
} else {
DTRACE_EXCEPTION_THROWN(NULL);
}