Module openj9.dtfj

Class Caa


  • public class Caa
    extends Object
    This class represents the LE view of an MVS Tcb. Caa stands for "Common Anchor Area" and this structure is the starting point for all the other LE structures. For programs written in C, this is the most useful thread view because it gives access to the C stack. The layout of the CAA control block is documented in the zOS Language Environment Debugging Guide GA22-7560-05
    • Constructor Detail

      • Caa

        public Caa​(Tcb tcb)
            throws CaaNotFound
        Create a new Caa from the given Tcb. Note that not all Tcbs have a Caa associated with them.
        Throws:
        CaaNotFound - if there is no Caa associated with this Tcb.
    • Method Detail

      • whereFound

        public String whereFound()
        Returns a string indicating where the registers were found. This is mainly for debugging purposes.
      • getCurrentFrame

        public DsaStackFrame getCurrentFrame()
        Get the current (ie top) stack frame for this thread.
        Returns:
        the current stack frame or null if there is no stack
      • getPThreadID

        public int getPThreadID()
                         throws IOException
        Get the pthread id for this thread. This is the top half of the CEECAATHDID field in the CAA
        Throws:
        IOException
      • hasFailed

        public boolean hasFailed()
        Returns true if this thread failed (ie crashed, abended, has gone to meet its maker).
      • getRegisterSet

        public RegisterSet getRegisterSet()
        Returns the RegisterSet for a failed thread. This will return null if the thread did not fail. In general, registers are only available (or at least only useful) for a failed thread.
      • getEdb

        public Edb getEdb()
        Returns the EDB (Enclave Data Block) for this Caa.
      • address

        public long address()
        Returns the address of this Caa.
      • space

        public AddressSpace space()
        Returns the AddressSpace we belong to
      • getTcb

        public Tcb getTcb()
        Returns the Tcb we are associated with.
      • ceecaalevel

        public int ceecaalevel()
                        throws IOException
        Returns the CEL level identifier.
        Throws:
        IOException - if an error occurred reading from the address space
      • ceecaa_stackdirection

        public int ceecaa_stackdirection()
                                  throws IOException
        Returns the stack direction, either 0 (up) or 1 (down). Should only be called if the LE level is 13 or greater.
        Throws:
        IOException - if an error occurred reading from the address space
      • ceecaasmcb

        public long ceecaasmcb()
                        throws IOException
        Returns the address of the storage manager control block.
        Throws:
        IOException - if an error occurred reading from the address space
      • ceecaarcb

        public long ceecaarcb()
                       throws IOException
        Returns the address of the region control block.
        Throws:
        IOException - if an error occurred reading from the address space
      • ceecaavba

        public long ceecaavba()
                       throws IOException
        Returns the address of the thread value block anchor
        Throws:
        IOException - if an error occurred reading from the address space
      • pthread_getspecific_d8_np

        public long pthread_getspecific_d8_np​(long key)
                                       throws IOException
        Searches thread value blocks for key matching the input key and returns the thread specific data associated with the specified key for the current thread. If no thread specific data has been set for key, Zero is returned.
        Throws:
        IOException
      • ceecaaddsa

        public long ceecaaddsa()
        Returns the address of the dummy dsa. This is used to indicate the bottom of the stack.
      • ceecaaedb

        public long ceecaaedb()
                       throws IOException
        Returns the address of the enclave data block.
        Throws:
        IOException - if an error occurred reading from the address space
      • ceecaaerrcm

        public long ceecaaerrcm()
                         throws IOException
        Returns the address of the hcom.
        Throws:
        IOException - if an error occurred reading from the address space