summaryrefslogtreecommitdiff
path: root/sapi/phpdbg/phpdbg_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'sapi/phpdbg/phpdbg_utils.h')
-rw-r--r--sapi/phpdbg/phpdbg_utils.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/sapi/phpdbg/phpdbg_utils.h b/sapi/phpdbg/phpdbg_utils.h
index d4fd352cd4..4ba756139b 100644
--- a/sapi/phpdbg/phpdbg_utils.h
+++ b/sapi/phpdbg/phpdbg_utils.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2015 The PHP Group |
+ | Copyright (c) 1997-2016 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -73,8 +73,9 @@ PHPDBG_API int phpdbg_get_element(const char *name, size_t len); /* }}} */
PHPDBG_API void phpdbg_set_prompt(const char*);
PHPDBG_API const char *phpdbg_get_prompt(void); /* }}} */
-/* {{{ Console Width */
-PHPDBG_API int phpdbg_get_terminal_width(void); /* }}} */
+/* {{{ Console size */
+PHPDBG_API int phpdbg_get_terminal_width(void);
+PHPDBG_API int phpdbg_get_terminal_height(void); /* }}} */
PHPDBG_API void phpdbg_set_async_io(int fd);
@@ -98,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; \