[xdebug-dev] xdebug xdebug/php_xdebug.h xdebug/xdebug.c - Added the xdebug_print_function_trace() function to display a stack trace on

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Mon, 4 Sep 2006 23:20:18 +0200

Date: Mon Sep 4 23:20:18 CEST 2006
User: Derick Rethans
Directory: xdebug

Log Message:
[0.50]
- Added the xdebug_print_function_trace() function to display a stack trace on
  demand.

Modified files:
           xdebug/php_xdebug.h (version: 1.112)
           xdebug/xdebug.c (version: 1.335)

[FILE: /xdebug/php_xdebug.h]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- xdebug/php_xdebug.h:1.111 Fri Aug 11 09:46:13 2006 GMT
+++ xdebug/php_xdebug.h Mon Sep 04 19:20:18 2006 GMT
@@ -72,6 +72,7 @@
 /* call stack functions */
 PHP_FUNCTION(xdebug_get_stack_depth);
 PHP_FUNCTION(xdebug_get_function_stack);
+PHP_FUNCTION(xdebug_print_function_stack);
 PHP_FUNCTION(xdebug_get_declared_vars);
 PHP_FUNCTION(xdebug_call_class);
 PHP_FUNCTION(xdebug_call_function);

[FILE: /xdebug/xdebug.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.334
retrieving revision 1.335
diff -u -r1.334 -r1.335
--- xdebug/xdebug.c:1.334 Mon Sep 04 18:44:31 2006 GMT
+++ xdebug/xdebug.c Mon Sep 04 19:20:18 2006 GMT
@@ -108,6 +108,7 @@
 function_entry xdebug_functions[] = {
         PHP_FE(xdebug_get_stack_depth, NULL)
         PHP_FE(xdebug_get_function_stack, NULL)
+ PHP_FE(xdebug_print_function_stack, NULL)
         PHP_FE(xdebug_get_declared_vars, NULL)
         PHP_FE(xdebug_call_class, NULL)
         PHP_FE(xdebug_call_function, NULL)
@@ -2066,6 +2067,17 @@
         add_next_index_string(return_value, name, 1);
 }
 
+/* {{{ proto array xdebug_print_declared_vars()
+ Displays a stack trace */
+PHP_FUNCTION(xdebug_print_function_stack)
+{
+ function_stack_entry *i;
+
+ i = xdebug_get_stack_frame(0 TSRMLS_CC);
+ print_stack(!(strcmp("cli", sapi_module.name) == 0), "Xdebug", "user triggered", i->filename, i->lineno, !PG(display_errors) TSRMLS_CC);
+}
+/* }}} */
+
 /* {{{ proto array xdebug_get_declared_vars()
    Returns an array representing the current stack */
 PHP_FUNCTION(xdebug_get_declared_vars)
Received on Tue Sep 05 2006 - 09:17:08 BST

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