Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue818 require script #44

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion xdebug.c
Expand Up @@ -1473,7 +1473,9 @@ void xdebug_execute_ex(zend_execute_data *execute_data TSRMLS_DC)

fse->symbol_table = NULL;
fse->execute_data = NULL;
xdebug_llist_remove(XG(stack), XDEBUG_LLIST_TAIL(XG(stack)), xdebug_stack_element_dtor);
if (XG(stack)) {
xdebug_llist_remove(XG(stack), XDEBUG_LLIST_TAIL(XG(stack)), xdebug_stack_element_dtor);
}
XG(level)--;
}

Expand Down
14 changes: 0 additions & 14 deletions xdebug.ini
Expand Up @@ -17,13 +17,9 @@
; -----------------------------------------------------------------------------
; xdebug.cli_color
;
<<<<<<< HEAD
; Type: boolean, Default value: 0
=======
; Only in Xdebug versions > 2.2
;
; Type: integer, Default value: 0
>>>>>>> 6444e03... Update the changed xdebug.ini.
;
; If this setting is 1, Xdebug will color var_dumps and stack traces output when
; in CLI mode.
Expand Down Expand Up @@ -624,7 +620,6 @@
;
; Fields for the computerized format:
;
<<<<<<< HEAD
; =========== ===== ========== ========== ========== ============ ============= ========================================= ================================ ======== ===========
; Record type 1 2 3 4 5 6 7 8 9 10
; =========== ===== ========== ========== ========== ============ ============= ========================================= ================================ ======== ===========
Expand All @@ -633,15 +628,6 @@
; ----------- ----- ---------- ---------- ---------- ------------ ------------- ----------------------------------------- -------------------------------- -------- -----------
; Exit level function # always '1' time index memory usage empty
; =========== ===== ========== ========== ========== ============ ============= ========================================= ================================ ======== ===========
=======
; =========== ===== =========== =========== ========== ============ ============= =========================================== ================================ ======== ===========
; Record type 1 2 3 4 5 6 7 8 9 10
; =========== ===== =========== =========== ========== ============ ============= =========================================== ================================ ======== ===========
; Entry level function # always '0' time index memory usage function name user-defined (1) or internal function (0) name of the include/require file filename line number
; ----------- ----- ----------- ----------- ---------- ------------ ------------- ------------------------------------------- -------------------------------- -------- -----------
; Exit level function # always '1' time index memory usage empty
; =========== ===== =========== =========== ========== ============ ============= =========================================== ================================ ======== ===========
>>>>>>> 6444e03... Update the changed xdebug.ini.
;
; See the introduction of Function Traces for a few examples.
;
Expand Down
27 changes: 14 additions & 13 deletions xdebug_stack.c
Expand Up @@ -1005,6 +1005,7 @@ function_stack_entry *xdebug_add_stack_frame(zend_execute_data *zdata, zend_op_a
#endif
tmp->time = xdebug_get_utime();
tmp->lineno = 0;
tmp->prev = 0;

xdebug_build_fname(&(tmp->function), zdata TSRMLS_CC);
if (!tmp->function.type) {
Expand Down Expand Up @@ -1153,24 +1154,24 @@ function_stack_entry *xdebug_add_stack_frame(zend_execute_data *zdata, zend_op_a
}
}

if (XDEBUG_LLIST_TAIL(XG(stack))) {
function_stack_entry *prev = XDEBUG_LLIST_VALP(XDEBUG_LLIST_TAIL(XG(stack)));
tmp->prev = prev;
if (XG(profiler_aggregate)) {
if (prev->aggr_entry->call_list) {
if (!zend_hash_exists(prev->aggr_entry->call_list, aggr_key, aggr_key_len+1)) {
if (XG(stack)) {
if (XDEBUG_LLIST_TAIL(XG(stack))) {
function_stack_entry *prev = XDEBUG_LLIST_VALP(XDEBUG_LLIST_TAIL(XG(stack)));
tmp->prev = prev;
if (XG(profiler_aggregate)) {
if (prev->aggr_entry->call_list) {
if (!zend_hash_exists(prev->aggr_entry->call_list, aggr_key, aggr_key_len+1)) {
zend_hash_add(prev->aggr_entry->call_list, aggr_key, aggr_key_len+1, (void*)&tmp->aggr_entry, sizeof(xdebug_aggregate_entry*), NULL);
}
} else {
prev->aggr_entry->call_list = xdmalloc(sizeof(HashTable));
zend_hash_init_ex(prev->aggr_entry->call_list, 1, NULL, NULL, 1, 0);
zend_hash_add(prev->aggr_entry->call_list, aggr_key, aggr_key_len+1, (void*)&tmp->aggr_entry, sizeof(xdebug_aggregate_entry*), NULL);
}
} else {
prev->aggr_entry->call_list = xdmalloc(sizeof(HashTable));
zend_hash_init_ex(prev->aggr_entry->call_list, 1, NULL, NULL, 1, 0);
zend_hash_add(prev->aggr_entry->call_list, aggr_key, aggr_key_len+1, (void*)&tmp->aggr_entry, sizeof(xdebug_aggregate_entry*), NULL);
}
}
} else {
tmp->prev = 0;
xdebug_llist_insert_next(XG(stack), XDEBUG_LLIST_TAIL(XG(stack)), tmp);
}
xdebug_llist_insert_next(XG(stack), XDEBUG_LLIST_TAIL(XG(stack)), tmp);

if (XG(profiler_aggregate)) {
xdfree(aggr_key);
Expand Down