Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

td_ta_map_id2thr(3cdb) [opensolaris man page]

td_ta_map_id2thr(3C_DB) 				Threads Debugging Library Functions				   td_ta_map_id2thr(3C_DB)

NAME
td_ta_map_id2thr, td_ta_map_lwp2thr - convert a thread ID or LWP ID to a thread handle SYNOPSIS
cc [ flag... ] file... -lc_db [ library... ] #include <proc_service.h> #include <thread_db.h> td_ta_map_id2thr(const td_thragent_t *ta_p, thread_t tid,td_thrhandle_t *th_p); td_ta_map_lwp2thr(const td_thragent_t *ta_p, lwpid_t lwpid,td_thrhandle_t *th_p); DESCRIPTION
The td_ta_map_id2thr() function produces the td_thrhandle_t thread handle that corresponds to a particular thread ID, as returned by thr_create(3C) or thr_self(3C). The thread handle is returned in *th_p. The td_ta_map_lwp2thr() function produces the td_thrhandle_t thread handle for the thread that is currently executing on the light weight process ( LWP) and has an ID of lwpid. RETURN VALUES
TD_OK The call completed successfully. TD_BADTA An invalid internal process handle was passed in. TD_BADPH There is a NULL external process handle associated with this internal process handle. TD_DBERR A call to one of the imported interface routines failed. TD_NOTHR Either there is no thread with the given thread ID ( td_ta_map_id2thr) or no thread is currently executing on the given LWP ( td_ta_map_lwp2thr). TD_ERR The call did not complete successfully. ATTRIBUTES
See attributes(5) for description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
libc_db(3LIB), thr_create(3C), thr_self(3C), attributes(5) SunOS 5.11 20 Oct 1998 td_ta_map_id2thr(3C_DB)

Check Out this Related Man Page

td_thr_getgregs(3C_DB)					Threads Debugging Library Functions				    td_thr_getgregs(3C_DB)

NAME
td_thr_getgregs, td_thr_setgregs, td_thr_getfpregs, td_thr_setfpregs, td_thr_getxregsize, td_thr_getxregs, td_thr_setxregs - reading and writing thread registers in libc_db SYNOPSIS
cc [ flag... ] file... -lc_db [ library... ] #include <proc_service.h> #include <thread_db.h> td_err_e td_thr_getgregs(const td_thrhandle_t *th_p, prgregset_tgregset); td_err_e td_thr_setgregs(const td_thrhandle_t *th_p, prgregset_tgregset); td_err_e td_thr_getfpregs(const td_thrhandle_t *th_p, prfpregset_t *fpregset); td_err_e td_thr_setfpregs(const td_thrhandle_t *th_p, prfpregset_t *fpregset); td_err_e td_thr_getxregsize(const td_thrhandle_t *th_p, int *xregsize); td_err_e td_thr_getxregs(const td_thrhandle_t *th_p, prxregset_t *xregset); td_err_e td_thr_setxregs(const td_thrhandle_t *th_p, prxregset_t *xregset); DESCRIPTION
These functions read and write the register sets associated with thread th_p. The td_thr_getgregs() and td_thr_setgregs() functions get and set, respectively, the general registers of thread th_p. The td_thr_getfpregs() and td_thr_setfpregs() functions get and set, respectively, the thread's floating point register set. The td_thr_getxregsize(), td_thr_getxregs(), and td_thr_setxregs() functions are SPARC-specific. The td_thr_getxregsize() function returns in *xregsize the size of the architecture-dependent extra state registers. The td_thr_getxregs() and td_thr_setxregs() functions get and set, respectively, those extra state registers. On non-SPARC architectures, these functions return TD_NOXREGS. If the thread specified by th_p is currently executing on a lightweight process ( LWP), these functions read or write, respectively, the appropriate register set to the LWP using the imported interface. If the thread is not currently executing on an LWP, the floating point and extra state registers may cannot be read or written. Some of the general registers might also not be readable or writable, depending on the architecture, in which case td_thr_getfpregs() and td_thr_setfpregs() return TD_NOFPREGS and td_thr_getxregs() and td_thr_setxregs() will TD_NOXREGS. Calls to td_thr_getgregs() and td_thr_setgregs() succeed, but values returned for unreadable registers are undefined, val- ues specified for unwritable registers are ignored. In this instance, and TD_PARTIALREGS is returned. See the architecture-specific notes that follow regarding the registers that may be read and written for a thread not currently executing on an LWP. SPARC On a thread not currently assigned to an LWP, only %i0-%i7, %l0-%l7, %g7, %pc, and %sp (%o6) can be read or written. %pc and %sp refer to the program counter and stack pointer that the thread will have when it resumes execution. x86 Architecture On a thread not currently assigned to an LWP, only %pc, %sp, %ebp, %edi, %edi, and %ebx can be read. RETURN VALUES
TD_OK The call completed successfully. TD_BADTH An invalid thread handle was passed in. TD_DBERR A call to one of the imported interface routines failed. TD_PARTIALREGS Because the thread is not currently assigned to a LWP, not all registers were read or written. See DESCRIPTION for a dis- cussion about which registers are not saved when a thread is not assigned to an LWP. TD_NOFPREGS Floating point registers could not be read or written, either because the thread is not currently assigned to an LWP, or because the architecture does not have such registers. TD_NOXREGS Architecture-dependent extra state registers could not be read or written, either because the thread is not currently assigned to an LWP, or because the architecture does not have such registers, or because the architecture is not a SPARC architecture. TD_ERR A libc_db internal error occurred. ATTRIBUTES
See attributes(5) for description of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
libc_db(3LIB), attributes(5) SunOS 5.11 20 Oct 1998 td_thr_getgregs(3C_DB)
Man Page