TD_THR_GETGREGS(3C_DB) | Threads Debugging Library Functions | TD_THR_GETGREGS(3C_DB) |
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
Threads Debugging Library (libc_db, -lc_db)
#include
<proc_service.h>
#include <thread_db.h>
td_err_e
td_thr_getgregs
(const td_thrhandle_t
*th_p, prgregset_t gregset);
td_err_e
td_thr_setgregs
(const td_thrhandle_t
*th_p, prgregset_t gregset);
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);
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
()
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. The buffer
passed to td_thr_getxregs
() must be at least the
size indicated by td_thr_getxregsize
(). This size
must not be assumed and may change between processes. Failure to do so, will
result in the system overwriting memory. Not all platforms implement
extended registers. When they are not implemented, these functions return
TD_NOXREGS
.
The td_thr_getgregs
(),
td_thr_setgregs
(),
td_thr_getfpregs
(),
td_thr_setfpregs
(),
td_thr_getxregsize
(),
td_thr_getxregs
(), and
td_thr_setxregs
() functions return one of the
following values:
TD_OK
TD_BADTH
TD_DBERR
TD_NOFPREGS
TD_NOXREGS
TD_ERR
January 23, 2023 | OmniOS |