From 76e3e99dd674fe98130ba110564c607b12a7772c Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Fri, 21 Aug 2015 23:36:31 +0100 Subject: Fix issues with phpdbg SIGINT handler Also fix valgrind warnings in allocator when not using mmap()ed memory --- sapi/phpdbg/phpdbg_prompt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'sapi/phpdbg/phpdbg_prompt.c') 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); } -- cgit v1.2.1