[xdebug-dev] xdebug xdebug/xdebug.c xdebug/tests/get_declared_vars.phpt - Speedup Xdebug but only gathering information about variables in scopes when

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Fri, 30 Jun 2006 09:44:05 +0200

Date: Fri Jun 30 09:44:04 CEST 2006
User: Derick Rethans
Directory: xdebug

Log Message:
[0.50]
- Speedup Xdebug but only gathering information about variables in scopes when
  either remote debugging is used, or show_local_vars is enabled.

Modified files:
           xdebug/xdebug.c (version: 1.320)
           xdebug/tests/get_declared_vars.phpt (version: 1.3)

[FILE: /xdebug/xdebug.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.319
retrieving revision 1.320
diff -u -r1.319 -r1.320
--- xdebug/xdebug.c:1.319 Fri May 26 15:37:37 2006 GMT
+++ xdebug/xdebug.c Fri Jun 30 05:44:04 2006 GMT
@@ -1342,17 +1342,19 @@
 
         fse->symbol_table = EG(active_symbol_table);
 
- /* 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
- * 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. */
- for (le = XDEBUG_LLIST_TAIL(XG(stack)); le != NULL; le = XDEBUG_LLIST_PREV(le)) {
- xfse = XDEBUG_LLIST_VALP(le);
- add_used_variables(xfse, op_array);
- if (XDEBUG_IS_FUNCTION(xfse->function.type)) {
- break;
+ if (XG(remote_enabled) || 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
+ * 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. */
+ for (le = XDEBUG_LLIST_TAIL(XG(stack)); le != NULL; le = XDEBUG_LLIST_PREV(le)) {
+ xfse = XDEBUG_LLIST_VALP(le);
+ add_used_variables(xfse, op_array);
+ if (XDEBUG_IS_FUNCTION(xfse->function.type)) {
+ break;
+ }
                 }
         }
 

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

===================================================================
RCS file: cvstemp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- xdebug/tests/get_declared_vars.phpt:1.2 Tue Jan 31 20:07:19 2006 GMT
+++ xdebug/tests/get_declared_vars.phpt Fri Jun 30 05:44:04 2006 GMT
@@ -9,7 +9,7 @@
 xdebug.auto_profile=0
 xdebug.profiler_enable=0
 xdebug.dump_globals=0
-xdebug.show_local_vars=0
+xdebug.show_local_vars=1
 --FILE--
 <?php
         function a($a,$b) {
Received on Fri Jun 30 2006 - 09:44:44 BST

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