diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2015-06-22 12:56:29 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-06-22 12:58:33 +0200 |
commit | 29aad0ef45618a25d5f87031a3e4e74ba1f6ac58 (patch) | |
tree | a56120bd135219363d0de77dcb6af2c055245cec /sapi/phpdbg/phpdbg_opcode.c | |
parent | 44d545b8e1c0bb48a969e5208b6002b2423e6bde (diff) | |
download | php-git-29aad0ef45618a25d5f87031a3e4e74ba1f6ac58.tar.gz |
Add phpdbg userland API to fetch oplog
We may want to add some opcode info later, so that "opcodes" mode is more helpful
Diffstat (limited to 'sapi/phpdbg/phpdbg_opcode.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_opcode.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sapi/phpdbg/phpdbg_opcode.c b/sapi/phpdbg/phpdbg_opcode.c index cff756a5ed..ffc5db04d4 100644 --- a/sapi/phpdbg/phpdbg_opcode.c +++ b/sapi/phpdbg/phpdbg_opcode.c @@ -226,6 +226,15 @@ void phpdbg_print_opline_ex(zend_execute_data *execute_data, HashTable *vars, ze free(decode); } } + + if (PHPDBG_G(oplog_list)) { + phpdbg_oplog_entry *cur = zend_arena_alloc(&PHPDBG_G(oplog_arena), sizeof(phpdbg_oplog_entry)); + cur->op = (zend_op *) execute_data->opline; + cur->op_array = &execute_data->func->op_array; + cur->next = NULL; + PHPDBG_G(oplog_cur)->next = cur; + PHPDBG_G(oplog_cur) = cur; + } } /* }}} */ void phpdbg_print_opline(zend_execute_data *execute_data, zend_bool ignore_flags) /* {{{ */ |