components/php-5_3/php-sapi/patches/028_php_Zend_zend_exceptions.c.patch
author Rich Burridge <rich.burridge@oracle.com>
Tue, 13 Oct 2015 18:21:51 -0700
changeset 4945 d9d54aa673b6
parent 846 fe258446a1ae
permissions -rw-r--r--
21292090 "gmake test" failures for re2c plus hookup system tests

--- php-5.3.10/Zend/zend_exceptions.c_orig	Sun Jan  1 05:15:04 2012
+++ php-5.3.10/Zend/zend_exceptions.c	Wed Feb  8 11:25:25 2012
@@ -27,6 +27,7 @@
 #include "zend_interfaces.h"
 #include "zend_exceptions.h"
 #include "zend_vm.h"
+#include "zend_dtrace.h"
 
 zend_class_entry *default_exception_ce;
 zend_class_entry *error_exception_ce;
@@ -82,6 +83,15 @@
 
 void zend_throw_exception_internal(zval *exception TSRMLS_DC) /* {{{ */
 {
+#ifdef HAVE_DTRACE
+       if (DTRACE_EXCEPTION_THROWN_ENABLED()) {
+               char *classname;
+               int name_len;
+               zend_get_object_classname(exception, &classname, &name_len TSRMLS_CC);
+               DTRACE_EXCEPTION_THROWN(classname);
+       }
+#endif /* HAVE_DTRACE */
+
 	if (exception != NULL) {
 		zval *previous = EG(exception);
 		zend_exception_set_previous(exception, EG(exception) TSRMLS_CC);