summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_utils.h
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2016-04-03 19:56:15 +0100
committerJakub Zelenka <bukka@php.net>2016-04-03 19:56:15 +0100
commit6ac8bc4ecb1fdf112eefdd16d2c4f971e7ac232a (patch)
tree3612c90af5d656357045e107ccac556863e929a3 /sapi/phpdbg/phpdbg_utils.h
parentdf85331220ac60391d5f8d82c42a6c699f47fca1 (diff)
parent80015ba741fc857074050086db6c7b2a4716d6d5 (diff)
downloadphp-git-6ac8bc4ecb1fdf112eefdd16d2c4f971e7ac232a.tar.gz
Merge branch 'openssl_error_store' of github.com:bukka/php-src into openssl_error_store
Diffstat (limited to 'sapi/phpdbg/phpdbg_utils.h')
-rw-r--r--sapi/phpdbg/phpdbg_utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_utils.h b/sapi/phpdbg/phpdbg_utils.h
index 2bd4f35d71..4ba756139b 100644
--- a/sapi/phpdbg/phpdbg_utils.h
+++ b/sapi/phpdbg/phpdbg_utils.h
@@ -99,6 +99,14 @@ char *phpdbg_short_zval_print(zval *zv, int maxlen);
PHPDBG_API zend_bool phpdbg_check_caught_ex(zend_execute_data *ex, zend_object *exception);
+static zend_always_inline zend_execute_data *phpdbg_user_execute_data(zend_execute_data *ex) {
+ while (!ex->func || !ZEND_USER_CODE(ex->func->common.type)) {
+ ex = ex->prev_execute_data;
+ ZEND_ASSERT(ex);
+ }
+ return ex;
+}
+
#ifdef ZTS
#define PHPDBG_OUTPUT_BACKUP_DEFINES() \
zend_output_globals *output_globals_ptr; \