::DEBUG_STACK

 

The ::DEBUG_STACK table holds information about suspended debuggees.

Definition

Field Name

Field Type

Field Size

Description

user_id

Integer

4

Foreign key to the ::DEBUG_CONNECTIONS table.

stack_frame

autoinc

4

Part of the primary key of the table.

query_id

Integer

4

Handle of the query where this stack frame is currently executing. The value in the column may not correspond to any value in the ::DEBUG_STATEMENTS table. It is used internally.

source_id

Integer

4

Foreign key to the ::DEBUG_SOURCES table.

source_offset

Integer

4

The location in the source code for this stack frame’s execution point.

stmt_end

Integer

4

The location in the source where the currently executing statement ends.

Line

Integer

4

The line number in the current SQL script where execution was suspended.

souce_object

Varchar

68

The name of the object the current stack frame is referencing. It is in the form [ParentID].ObjectName if the current frame references a database object. It may also be NULL or "Base Script". The same information is available in the ::DEBUG_SOURCES table.

stmt_name

Char

32

Name of the query handle.

Remarks

The ::DEBUG_STACK table is the most important table for presenting information for human consumption. The primary key for the table has the expression "user_id;descend(stack_frame)". By setting a scope using the user_id as the partial key, the execution stack can be traversed from the top, where the execution has been suspended, to the bottom, where the query engine was first entered.

The information in the table is only valid for the suspended debuggees.