diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2015-08-21 23:36:31 +0100 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2015-08-21 23:36:31 +0100 |
commit | 76e3e99dd674fe98130ba110564c607b12a7772c (patch) | |
tree | a41bcd6977d13ff2c5f7638d302dce0203667ee5 /sapi/phpdbg/phpdbg_prompt.c | |
parent | f9ae74a4c05584983add5ab68042419d44032b1b (diff) | |
download | php-git-76e3e99dd674fe98130ba110564c607b12a7772c.tar.gz |
Fix issues with phpdbg SIGINT handler
Also fix valgrind warnings in allocator when not using mmap()ed memory
Diffstat (limited to 'sapi/phpdbg/phpdbg_prompt.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_prompt.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index 2001129ec8..5d5ed2822a 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -1628,7 +1628,13 @@ void phpdbg_force_interruption(void) /* {{{ */ { if (data) { if (data->func) { - phpdbg_notice("hardinterrupt", "opline=\"%p\" num=\"%lu\" file=\"%s\" line=\"%u\"", "Current opline: %p (op #%lu) in %s:%u", data->opline, (data->opline - data->func->op_array.opcodes) / sizeof(data->opline), data->func->op_array.filename, data->opline->lineno); + if (ZEND_USER_CODE(data->func->type)) { + phpdbg_notice("hardinterrupt", "opline=\"%p\" num=\"%lu\" file=\"%s\" line=\"%u\"", "Current opline: %p (op #%lu) in %s:%u", data->opline, (data->opline - data->func->op_array.opcodes) / sizeof(data->opline), data->func->op_array.filename, data->opline->lineno); + } else if (data->func->internal_function.function_name) { + phpdbg_notice("hardinterrupt", "func=\"%s\"", "Current opline: in internal function %s", data->func->internal_function.function_name->val); + } else { + phpdbg_notice("hardinterrupt", "", "Current opline: executing internal code"); + } } else { phpdbg_notice("hardinterrupt", "opline=\"%p\"", "Current opline: %p (op_array information unavailable)", data->opline); } |