[xdebug-dev] xdebug xdebug/test.sh xdebug/xdebug.c xdebug/tests/array_map.phpt xdebug/tests/assert_test.phpt xdebug/tests/auto_trace.phpt xdebug/tests/bug00003.phpt xdebug/tests/bug00146.phpt xdebug/tests/bug00184.phpt xdebug/tests/call_user_func_array.phpt xdebug/tests/call_user_func_array2.phpt xdebug/tests/peak_memory_usage.phpt xdebug/tests/test1.phpt xdebug/tests/test10b.phpt xdebug/tests/test11.phpt xdebug/tests/test12.phpt xdebug/tests/test13.phpt xdebug/tests/test14b.phpt xdebug/tests/test15.phpt xdebug/tests/test16b.phpt xdebug/tests/test17.phpt xdebug/tests/test18.phpt xdebug/tests/test20b.phpt xdebug/tests/test7b.phpt xdebug/tests/test8.phpt xdebug/tests/test9b.phpt xdebug/tests/trace.phpt - Implemented support for the 4 different collect_params settings for

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Sun, 6 May 2007 16:36:17 +0200

Date: Sun May 6 16:36:17 CEST 2007
User: Derick Rethans
Directory: xdebug

Log Message:
[1.00]
- Implemented support for the 4 different collect_params settings for
  function traces.
- Fixed the test cases accordingly.

Modified files:
           xdebug/test.sh (version: 1.18)
           xdebug/xdebug.c (version: 1.380)
           xdebug/tests/array_map.phpt (version: 1.14)
           xdebug/tests/assert_test.phpt (version: 1.16)
           xdebug/tests/auto_trace.phpt (version: 1.19)
           xdebug/tests/bug00003.phpt (version: 1.13)
           xdebug/tests/bug00146.phpt (version: 1.5)
           xdebug/tests/bug00184.phpt (version: 1.5)
           xdebug/tests/call_user_func_array.phpt (version: 1.15)
           xdebug/tests/call_user_func_array2.phpt (version: 1.15)
           xdebug/tests/peak_memory_usage.phpt (version: 1.4)
           xdebug/tests/test1.phpt (version: 1.20)
           xdebug/tests/test10b.phpt (version: 1.9)
           xdebug/tests/test11.phpt (version: 1.14)
           xdebug/tests/test12.phpt (version: 1.17)
           xdebug/tests/test13.phpt (version: 1.14)
           xdebug/tests/test14b.phpt (version: 1.13)
           xdebug/tests/test15.phpt (version: 1.14)
           xdebug/tests/test16b.phpt (version: 1.12)
           xdebug/tests/test17.phpt (version: 1.15)
           xdebug/tests/test18.phpt (version: 1.17)
           xdebug/tests/test20b.phpt (version: 1.10)
           xdebug/tests/test7b.phpt (version: 1.9)
           xdebug/tests/test8.phpt (version: 1.19)
           xdebug/tests/test9b.phpt (version: 1.10)
           xdebug/tests/trace.phpt (version: 1.14)

[FILE: /xdebug/test.sh]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- xdebug/test.sh:1.17 Sat May 27 18:06:57 2006 GMT
+++ xdebug/test.sh Sun May 06 12:36:17 2007 GMT
@@ -1 +1 @@
-TEST_PHP_EXECUTABLE=`which php-5.2dev` php-5.2dev -dxdebug.auto_trace=0 /dat/dev/php/php-5.2dev/run-tests.php tests/*.phpt
+TEST_PHP_EXECUTABLE=`which php-5.2dev` php-5.2dev -dxdebug.auto_trace=0 /home/derick/dev/php/php-5.2dev/run-tests.php tests/*.phpt

[FILE: /xdebug/xdebug.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.379
retrieving revision 1.380
diff -u -r1.379 -r1.380
--- xdebug/xdebug.c:1.379 Tue Apr 24 12:17:39 2007 GMT
+++ xdebug/xdebug.c Sun May 06 12:36:17 2007 GMT
@@ -1452,7 +1452,7 @@
         if (XG(remote_enabled) || XG(collect_vars) || XG(show_local_vars)) {
                 /* Because include/require is treated as a stack level, we have to add used
                  * variables in include/required files to all the stack levels above, until
- * we hit a function or the to level stack. This is so that the variables
+ * we hit a function or the top level stack. This is so that the variables
                  * show up correctly where they should be. We always call
                  * add_used_variables on the current stack level, otherwise vars in include
                  * files do not show up in the locals list. */
@@ -1941,20 +1941,35 @@
         xdfree(tmp_name);
 
         /* Printing vars */
- for (j = 0; j < i->varc; j++) {
- char *tmp_value;
+ if (XG(collect_params) > 0) {
+ for (j = 0; j < i->varc; j++) {
+ char *tmp_value;
 
- if (c) {
- xdebug_str_addl(&str, ", ", 2, 0);
- } else {
- c = 1;
- }
+ if (c) {
+ xdebug_str_addl(&str, ", ", 2, 0);
+ } else {
+ c = 1;
+ }
 
- tmp_value = xdebug_get_zval_value(i->var[j].addr, 0, NULL);
- if (tmp_value) {
- xdebug_str_add(&str, tmp_value, 1);
- } else {
- xdebug_str_add(&str, "???", 0);
+ if (i->var[j].name && XG(collect_params) >= 4) {
+ xdebug_str_add(&str, xdebug_sprintf("$%s = ", i->var[j].name), 1);
+ }
+
+ switch (XG(collect_params)) {
+ case 1: // synopsis
+ case 2:
+ tmp_value = xdebug_get_zval_synopsis(i->var[j].addr, 0, NULL);
+ break;
+ case 3:
+ default:
+ tmp_value = xdebug_get_zval_value(i->var[j].addr, 0, NULL);
+ break;
+ }
+ if (tmp_value) {
+ xdebug_str_add(&str, tmp_value, 1);
+ } else {
+ xdebug_str_add(&str, "???", 0);
+ }
                 }
         }
 
@@ -2200,7 +2215,6 @@
         if (EG(error_reporting) & type) {
                 /* Log to logger */
                 if (PG(log_errors)) {
- char log_buffer[1024];
 
 #ifdef PHP_WIN32
                         if (type==E_CORE_ERROR || type==E_CORE_WARNING) {

[FILE: /xdebug/tests/array_map.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- xdebug/tests/array_map.phpt:1.13 Sat Dec 23 19:04:22 2006 GMT
+++ xdebug/tests/array_map.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/assert_test.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- xdebug/tests/assert_test.phpt:1.15 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/assert_test.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/auto_trace.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- xdebug/tests/auto_trace.phpt:1.18 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/auto_trace.phpt Sun May 06 12:36:17 2007 GMT
@@ -7,7 +7,7 @@
 xdebug.auto_trace=1
 xdebug.trace_options=0
 xdebug.trace_output_dir=/tmp
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/bug00003.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- xdebug/tests/bug00003.phpt:1.12 Fri Dec 30 14:54:24 2005 GMT
+++ xdebug/tests/bug00003.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/bug00146.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- xdebug/tests/bug00146.phpt:1.4 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/bug00146.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=1
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/bug00184.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- xdebug/tests/bug00184.phpt:1.4 Fri Apr 27 22:04:45 2007 GMT
+++ xdebug/tests/bug00184.phpt Sun May 06 12:36:17 2007 GMT
@@ -6,7 +6,7 @@
 xdebug.trace_options=0
 xdebug.trace_output_dir=/tmp
 xdebug.collect_return=1
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.auto_profile=0
 xdebug.profiler_enable=0
 xdebug.dump_globals=0

[FILE: /xdebug/tests/call_user_func_array.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- xdebug/tests/call_user_func_array.phpt:1.14 Fri Sep 29 08:07:17 2006 GMT
+++ xdebug/tests/call_user_func_array.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/call_user_func_array2.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- xdebug/tests/call_user_func_array2.phpt:1.14 Fri Sep 29 08:07:17 2006 GMT
+++ xdebug/tests/call_user_func_array2.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/peak_memory_usage.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- xdebug/tests/peak_memory_usage.phpt:1.3 Fri Dec 30 13:52:37 2005 GMT
+++ xdebug/tests/peak_memory_usage.phpt Sun May 06 12:36:17 2007 GMT
@@ -4,7 +4,7 @@
 <?php if (!extension_loaded("xdebug")) print "skip"; ?>
 --INI--
 xdebug.enable=1
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.auto_profile=0
 xdebug.profiler_enable=0
 --FILE--
@@ -26,13 +26,12 @@
 
         unset($param);
 
- $d = xdebug_memory_usage();
         $e = xdebug_peak_memory_usage();
+ $d = xdebug_memory_usage();
 
         var_dump($a, $b, $c, $d, $e);
         echo ($b > $c) ? "Current is HIGHER than peak\n" : "Current is lower than peak\n";
         echo ($d > $e) ? "Current is HIGHER than peak\n" : "Current is lower than peak\n";
- echo ($c == $e) ? "Peak is equal\n" : "peak is NOT equal\n";
 ?>
 --EXPECTF--
 int(%d)
@@ -42,4 +41,3 @@
 int(%d)
 Current is lower than peak
 Current is lower than peak
-Peak is equal

[FILE: /xdebug/tests/test1.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- xdebug/tests/test1.phpt:1.19 Fri Dec 22 12:51:03 2006 GMT
+++ xdebug/tests/test1.phpt Sun May 06 12:36:17 2007 GMT
@@ -4,7 +4,7 @@
 <?php if (!extension_loaded("xdebug")) print "skip"; ?>
 --INI--
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/test10b.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- xdebug/tests/test10b.phpt:1.8 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/test10b.phpt Sun May 06 12:36:17 2007 GMT
@@ -6,7 +6,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=1
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/test11.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- xdebug/tests/test11.phpt:1.13 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/test11.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=1
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/test12.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- xdebug/tests/test12.phpt:1.16 Fri Dec 22 12:51:03 2006 GMT
+++ xdebug/tests/test12.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/test13.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- xdebug/tests/test13.phpt:1.13 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/test13.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/test14b.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- xdebug/tests/test14b.phpt:1.12 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/test14b.phpt Sun May 06 12:36:17 2007 GMT
@@ -7,7 +7,7 @@
 xdebug.enable=1
 xdebug.auto_trace=0
 report_memleaks=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/test15.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- xdebug/tests/test15.phpt:1.13 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/test15.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.show_mem_delta=0

[FILE: /xdebug/tests/test16b.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- xdebug/tests/test16b.phpt:1.11 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/test16b.phpt Sun May 06 12:36:17 2007 GMT
@@ -7,7 +7,7 @@
 xdebug.enable=1
 xdebug.auto_trace=0
 xdebug.auto_profile=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.show_mem_delta=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/test17.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- xdebug/tests/test17.phpt:1.14 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/test17.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/test18.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- xdebug/tests/test18.phpt:1.16 Sat May 27 18:06:57 2006 GMT
+++ xdebug/tests/test18.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.default_enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/test20b.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- xdebug/tests/test20b.phpt:1.9 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/test20b.phpt Sun May 06 12:36:17 2007 GMT
@@ -6,7 +6,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/test7b.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- xdebug/tests/test7b.phpt:1.8 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/test7b.phpt Sun May 06 12:36:17 2007 GMT
@@ -7,7 +7,7 @@
 xdebug.enable=1
 xdebug.auto_trace=0
 xdebug.auto_profile=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.show_mem_delta=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/test8.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- xdebug/tests/test8.phpt:1.18 Fri Dec 22 12:51:03 2006 GMT
+++ xdebug/tests/test8.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=1
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/test9b.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- xdebug/tests/test9b.phpt:1.9 Sat Dec 23 19:04:22 2006 GMT
+++ xdebug/tests/test9b.phpt Sun May 06 12:36:17 2007 GMT
@@ -6,7 +6,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0

[FILE: /xdebug/tests/trace.phpt]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- xdebug/tests/trace.phpt:1.13 Mon Jan 02 15:12:31 2006 GMT
+++ xdebug/tests/trace.phpt Sun May 06 12:36:17 2007 GMT
@@ -5,7 +5,7 @@
 --INI--
 xdebug.enable=1
 xdebug.auto_trace=0
-xdebug.collect_params=1
+xdebug.collect_params=3
 xdebug.collect_return=0
 xdebug.auto_profile=0
 xdebug.profiler_enable=0
Received on Sun May 06 2007 - 16:36:21 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST