summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_utils.h
diff options
context:
space:
mode:
authorBob Weinand <bobwei9@hotmail.com>2016-02-17 20:28:07 +0100
committerBob Weinand <bobwei9@hotmail.com>2016-02-17 20:28:07 +0100
commiteea576d5899c4c6665a44aa14129ad455d56572b (patch)
tree917e91e55dee543c28a46f0ff75818cd2944c7bb /sapi/phpdbg/phpdbg_utils.h
parentbbea2ae0481f5cf21182ce2cee1e00e06a8aa4f1 (diff)
parent055b4112188cccdc250790ab063479d2922f5fda (diff)
downloadphp-git-eea576d5899c4c6665a44aa14129ad455d56572b.tar.gz
Merge branch 'PHP-7.0'
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; \