Permalink
Browse files

Merge branch 'xdebug_2_2'

Conflicts:
	xdebug.ini
  • Loading branch information...
2 parents 979b451 + ef6c2f9 commit 64887e2e916e29dc8187ce225335f0a4cef8e0f3 @derickr committed Dec 18, 2012
Showing with 19 additions and 37 deletions.
  1. +3 −1 xdebug.c
  2. +2 −23 xdebug.ini
  3. +14 −13 xdebug_stack.c
View
@@ -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)--;
}
View
@@ -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.
@@ -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.
;
View
@@ -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) {
@@ -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);

0 comments on commit 64887e2

Please sign in to comment.