MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Threads Debugging Library Functions        tdthrgetgregs(3CDB)



NAME
     tdthrgetgregs,     tdthrsetgregs,      tdthrgetfpregs,
     tdthrsetfpregs,    tdthrgetxregsize,    tdthrgetxregs,
     tdthrsetxregs - reading and writing  thread  registers  in
     libcdb

SYNOPSIS
     cc [ flag... ] file... -lcdb [ library... ]
     #include 
     #include 

     tderre tdthrgetgregs(const tdthrhandlet *thp, prgregsettgregset);


     tderre tdthrsetgregs(const tdthrhandlet *thp, prgregsettgregset);


     tderre tdthrgetfpregs(const tdthrhandlet *thp, prfpregsett *fpregset);


     tderre tdthrsetfpregs(const tdthrhandlet *thp, prfpregsett *fpregset);


     tderre tdthrgetxregsize(const tdthrhandlet *thp, int *xregsize);


     tderre tdthrgetxregs(const tdthrhandlet *thp, prxregsett *xregset);


     tderre tdthrsetxregs(const tdthrhandlet *thp, prxregsett *xregset);


DESCRIPTION
     These functions read and write the register sets  associated
     with     thread     thp.    The    tdthrgetgregs()    and
     tdthrsetgregs() functions get and set,  respectively,  the
     general registers of thread thp. The tdthrgetfpregs() and
     tdthrsetfpregs() functions get and set, respectively,  the
     thread's     floating     point     register     set.    The
     tdthrgetxregsize(),         tdthrgetxregs(),         and
     tdthrsetxregs()    functions   are   SPARC-specific.   The
     tdthrgetxregsize() function returns in *xregsize the  size
     of  the  architecture-dependent  extra  state registers. The
     tdthrgetxregs() and tdthrsetxregs()  functions  get  and
     set, respectively, those extra state registers. On non-SPARC
     architectures, these functions return TDNOXREGS.


     If the thread specified by thp 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



SunOS 5.11          Last change: 20 Oct 1998                    1






Threads Debugging Library Functions        tdthrgetgregs(3CDB)



     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 tdthrgetfpregs() and
     tdthrsetfpregs() return  TDNOFPREGS and tdthrgetxregs()
     and    tdthrsetxregs()    will    TDNOXREGS.   Calls   to
     tdthrgetgregs() and tdthrsetgregs() succeed, but  values
     returned  for  unreadable  registers  are  undefined, values
     specified for unwritable  registers  are  ignored.  In  this
     instance,   and   TDPARTIALREGS   is   returned.   See  the
     architecture-specific notes that follow regarding the regis-
     ters 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
     TDOK             The call completed successfully.


     TDBADTH          An invalid thread handle was passed in.


     TDBER          A call to one of  the  imported  interface
                       routines failed.


     TDPARTIALREGS    Because  the  thread  is   not   currently
                       assigned  to a LWP, not all registers were
                       read or written.  See  DESCRIPTION  for  a
                       discussion  about  which registers are not
                       saved when a thread is not assigned to  an
                       LWP.


     TDNOFPREGS       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.


     TDNOXREGS        Architecture-dependent extra state  regis-
                       ters  could not be read or written, either



SunOS 5.11          Last change: 20 Oct 1998                    2






Threads Debugging Library Functions        tdthrgetgregs(3CDB)



                       because  the  thread  is   not   currently
                       assigned  to an LWP, or because the archi-
                       tecture does not have such  registers,  or
                       because  the  architecture  is not a SPARC
                       architecture.


     TDER            A libcdb internal error occurred.


ATRIBUTES
     See attributes(5) for description of  the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     MT-Level                     Safe                        
    


SEE ALSO
     libcdb(3LIB), attributes(5)






























SunOS 5.11          Last change: 20 Oct 1998                    3



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™