OS "GETPID"

Search and display the process ID of a given thread managed by the Linux* OS kernel.

Syntax

OS "GETPID threadname [/SETVAR=dbvar]"

Parameters

threadname

The name of the thread for which you want you look up the PID.

/SETVAR=dbvar

Set this option to additionally store the result to the specified debugger variable dbvar.

Description

This command searches the Linux* thread list for the given thread name and returns the according process ID. If there are multiple entries with the given name, all process IDs will be printed.

If you set the optional /SETVAR option, additionally the result of the search is stored to the specified debugger variable dbvar. If there were multiple entries with the given name, the debugger variable will be set to the lowest process ID. If no entry matched the given name, the value 0xFFFFFFFFFFFFFFFF will be stored to the debugger variable.

For more complete information about compiler optimizations, see our Optimization Notice.