Skip to content

Commit

Permalink
Merge branch 'xdebug_2_2'
Browse files Browse the repository at this point in the history
Conflicts:
	xdebug.ini
  • Loading branch information
derickr committed Dec 18, 2012
2 parents 979b451 + ef6c2f9 commit 64887e2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 37 deletions.
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
25 changes: 2 additions & 23 deletions xdebug.ini
Expand Up @@ -17,10 +17,10 @@
; -----------------------------------------------------------------------------
; xdebug.cli_color
;
; Type: integer, Default value: 0
;
; Only in Xdebug versions > 2.2
;
; Type: integer, Default value: 0
;
; If this setting is 1, Xdebug will color var_dumps and stack traces output when
; in CLI mode and when the output is a tty. On Windows, the ANSICON [1] tool
; needs to be installed.
Expand Down Expand Up @@ -691,34 +691,13 @@
;
; Fields for the computerized format:
;
<<<<<<< HEAD
; =========== ===== =========== =========== ========== ============ ============= =========================================== ================================ ======== ===========
; 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
; =========== ===== =========== =========== ========== ============ ============= =========================================== ================================ ======== ===========
=======
<<<<<<< HEAD
; =========== ===== ========== ========== ========== ============ ============= ========================================= ================================ ======== ===========
; 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 name of the include/require file filename line number
; function (0)
; ----------- ----- ---------- ---------- ---------- ------------ ------------- ----------------------------------------- -------------------------------- -------- -----------
; 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.
>>>>>>> xdebug_2_2
;
; 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

0 comments on commit 64887e2

Please sign in to comment.