Temporarily restore another thread context for debugging.
CS_RETCODE srv_dbg_switch(spid)
CS_INT spid;
The server process ID (spid) of the thread whose context should be temporarily restored.
Returns |
To indicate |
---|---|
CS_SUCCEED |
The routine completed successfully. |
CS_FAIL |
The routine failed. |
srv_dbg_switch is not available on all platforms. Use srv_capability to determine whether a platform supports srv_dbg_switch.
Once a thread context is switched, continuing execution of the application restores the original thread context and the application continues to run normally.
The thread whose context has been restored is not runnable. It can only be examined.
On UNIX systems, do not call srv_dbg_switch from within system service routines. If you do, a SIGTRAP signal is raised and the program terminates.
The spid can be obtained by calling srv_thread_props with the property argument set to SRV_T_SPID. It is an error to attempt to restore the context for the currently running thread.