Show Thread Command

This command displays information about one thread or all threads.

Show Thread [thread_name] [-stack] [-web]

Prerequisites

None

Parameters

thread_name

The optional name of the thread to be displayed. If omitted, brief information about all known threads is displayed. If specified, more detailed information for the single thread is displayed.

-stack

An optional switch keyword that indicates additional stack information is to be displayed for each thread.

-web

An optional switch keyword that indicates the output should be formatted for the web interface. The web format places all information for each thread on a single line, and separates information fields with vertical bars ( | ) rather than commas.

Remarks

If thread_name is omitted, the brief thread information is as follows:

thread_name, thread_state

where thread_state is one of:

Idle

The thread completed normally.

Stopping

The thread is transitioning from Paused or Error to Idle.

Running

The thread is actively executing a procedure.

Paused

The thread has paused due to a breakpoint, Break command or other non-error condition.

Error

The thread has paused due to an error condition.

If thread_name is specified, the detailed thread information is shown on multiple lines as follows:

thread_name, thread_state
status_code, “status_string”
project_name, proc_name, proc_line, file_name, file_line

where:

thread_state

Is the same as described in the brief status above,

status_code

Is a standard status numeric value,

status_string

Is the string associated with the status_code.

project_name

Is the name of the project being executed by the thread,

proc_name

Is the name of the procedure currently being executed by the thread.

proc_line

Is the number of the line of the procedure that corresponds to the current procedure step.

file_name

Is the name of the file where the procedure is defined.

file_line

Is the number of the line in the file that corresponds to the current procedure step.

If the -stack switch is specified, the following stack information is added for each thread. The sizes are in Kbytes.

stack_level, stack_size, stack_max

where:

stack_level

Is the current stack usage level.

stack_size

Is the total stack space available for this thread.

stack_max

Is the maximum stack space used by this thread since it was started.

Both the -stack and -web switches may be specified.

Examples

Show Thread
My_project, Running
Anotherthread, Idle


Show Thread My_project

My_project, Error

-130, “Invalid argument”

My_project, main, 20, test1.gpl, 45

See Also

Console Commands | Show Variable Command