Skip to content

Instantly share code, notes, and snippets.

@bwoebi
Last active October 24, 2017 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bwoebi/8f9ae2d2b501d45dee3ac7c3a372f3ce to your computer and use it in GitHub Desktop.
Save bwoebi/8f9ae2d2b501d45dee3ac7c3a372f3ce to your computer and use it in GitHub Desktop.
zend_execute_data *ex = EG(current_execute_data), *start_ex = ex;
zend_function *func;
zend_op *opline;
if (!ex) {
continue;
}
fetch_loop:
{
zend_execute_data *prev = ex->prev_execute_data;
func = ex->func;
opline = ex->opline;
if (start_ex != EG(current_execute_data) || !func) {
continue;
}
if (!ZEND_USER_CODE(func->type)) {
ex = prev;
if (prev) {
goto fetch_loop;
}
continue;
} else if (!opline) {
continue;
}
}
g->entries[g->entries_num].filename = func->op_array.filename;
g->entries[g->entries_num].lineno = opline->lineno;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment