Go to main content
Oracle® Developer Studio 12.6: Debugging a Program with dbx

Exit Print View

Updated: June 2017
 
 

thread Command

The thread command lists or changes the current thread.

Native Mode Syntax

thread

Display current thread.

thread thread-ID

Switch to thread thread-ID.

In the following variations, the current thread is assumed if a thread ID is not specified.

thread -info [thread-ID]

Print everything known about the specified thread. For OpenMP threads, the information includes the OpenMP thread ID, parallel region ID, task region ID, and thread state.

thread -hide [thread-ID]

Hide the specified (or current) thread. It will not show up in the generic threads listing.

thread -unhide [thread-ID]

Unhide the specified (or current) thread.

thread -unhide all

Unhide all threads.

thread -suspend thread-ID

Keep the specified thread from ever running. A suspended thread shows up with an “S” in the threads list.

thread -resume thread-ID

Undo the effect of -suspend.

thread -blocks [thread-ID]

List all locks held by the specified thread blocking other threads.

thread -blockedby [thread-ID]

Show which synchronization object the specified thread is blocked by, if any.

where:

thread-ID is a thread ID.

Java Mode Syntax

thread

Display current thread.

thread thread-ID

Switch to thread thread-ID.

In the following variations, the current thread is assumed if a thread ID is not specified.

thread -info [thread-ID]

Print everything known about the specified thread.

thread -hide [thread-ID]

Hide the specified (or current) thread. It will not show up in the generic threads listing.

thread -unhide [thread-ID]

Unhide the specified (or current) thread.

thread -unhide all

Unhide all threads.

thread -suspend thread-ID

Keep the specified thread from ever running. A suspended thread shows up with an “S” in the threads list.

thread -resume thread-ID

Undo the effect of -suspend.

thread -blocks [thread-ID]

Lists the Java monitor owned by thread-ID.

thread -blockedby [thread-id]

Lists the Java monitor on which thread-ID is blocked.

where:

thread-ID is a dbx-style thread ID of the form t@number or the Java thread name specified for the thread.