rdebug_show_stack_state

NAME

rdebug_show_stack_state(): Show worker's current stack state (applies to debugged routines only).

TYPE

Procedure

DESCRIPTION

This procedure is part of the rdebug API.

rdebug_show_stack_state() shows the stack state of the worker: the stack of routine called at the point in time at which rdebug_show_stack_state() is executed.

A worker's routine may call upon a second routine, which, in turn, may call upon a third routine, and so forth. rdebug_show_stack_state() will present:

In formation only applies to routines compiled with debug mode. Any routine that is called, but which is not compiled with debug mode, does not appear on rdebug's stack and has no mention.

Execution of this routine only makes sense on an active debugging session, i.e. after calling rdebug_start().

SYNOPSIS

rdebug_show_stack_state()
  READS SQL DATA

EXAMPLES

Show the stack state of a running worker:

mysql> call rdebug_show_stack_state();
+-------------+----------------+--------------------------+--------------+---------------------+
| stack_level | routine_schema | routine_name             | statement_id | entry_time          |
+-------------+----------------+--------------------------+--------------+---------------------+
|           1 | test           | analyze_continents       |          127 | 2013-03-30 16:52:13 |
|           2 | test           | analyze_continent_cities |           93 | 2013-03-30 16:52:16 |
+-------------+----------------+--------------------------+--------------+---------------------+
In the above, analyze_continents() was invoked at 2013-03-30 16:52:13. At 2013-03-30 16:52:16, and at statement ID 127 it called upon analyze_continent_cities(), currently waiting on statement ID 93.
To clarify, it is impossible to verify from the above whether additional routines are being called, which have no debug info. rdebug does not know anything about such routines, and only presents data for those routines compiled with debug mode.

ENVIRONMENT

MySQL 5.1 or newer

SEE ALSO

rdebug_compile_routine(), rdebug_run(), rdebug_set_breakpoint(), rdebug_show_routine_statements()

AUTHOR

Shlomi Noach
 
common_schema documentation