Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.10 KB | None | 0 0
  1. diff --git a/sapi/phpdbg/phpdbg_bp.c b/sapi/phpdbg/phpdbg_bp.c
  2. index 6edb314..f2ce94c 100644
  3. --- a/sapi/phpdbg/phpdbg_bp.c
  4. +++ b/sapi/phpdbg/phpdbg_bp.c
  5. @@ -1119,8 +1119,12 @@ PHPDBG_API phpdbg_breakbase_t *phpdbg_find_breakpoint(zend_execute_data *execute
  6.  
  7.         if (PHPDBG_G(flags) & (PHPDBG_HAS_METHOD_BP|PHPDBG_HAS_SYM_BP)) {
  8.                 zend_op_array *op_array = &execute_data->func->op_array;
  9. +         uint32_t entry_offset = op_array->num_args + !!(op_array->fn_flags & ZEND_ACC_VARIADIC);
  10. +         if (CG(compiler_options) & ZEND_COMPILE_EXTENDED_INFO) {
  11. +                 entry_offset += 2; /* ZEND_EXT_NOP + ZEND_EXT_STMT */
  12. +         }
  13.                 /* check we are at the beginning of the stack, but after argument RECV */
  14. -           if (execute_data->opline == op_array->opcodes + op_array->num_args + !!(op_array->fn_flags & ZEND_ACC_VARIADIC)) {
  15. +         if (execute_data->opline == op_array->opcodes + entry_offset) {
  16.                         if ((base = phpdbg_find_breakpoint_symbol(execute_data->func))) {
  17.                                 goto result;
  18.                         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement