- java.lang.Object
-
- com.ibm.dtfj.corereaders.zos.le.Caa
-
public class Caa extends Object
This class represents the LE view of an MVSTcb. 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longaddress()Returns the address of this Caa.intceecaa_stackdirection()Returns the stack direction, either 0 (up) or 1 (down).longceecaaddsa()Returns the address of the dummy dsa.longceecaaedb()Returns the address of the enclave data block.longceecaaerrcm()Returns the address of the hcom.intceecaalevel()Returns the CEL level identifier.longceecaarcb()Returns the address of the region control block.longceecaasmcb()Returns the address of the storage manager control block.longceecaavba()Returns the address of the thread value block anchorstatic Caa[]getCaas(AddressSpace space)Returns an array containing all of the Caas in the givenAddressSpaceDsaStackFramegetCurrentFrame()Get the current (ie top) stack frame for this thread.EdbgetEdb()Returns the EDB (Enclave Data Block) for this Caa.intgetPThreadID()Get the pthread id for this thread.RegisterSetgetRegisterSet()Returns theRegisterSetfor a failed thread.TcbgetTcb()Returns the Tcb we are associated with.booleanhasFailed()Returns true if this thread failed (ie crashed, abended, has gone to meet its maker).longpthread_getspecific_d8_np(long key)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.AddressSpacespace()Returns the AddressSpace we belong toStringwhereFound()Returns a string indicating where the registers were found.
-
-
-
Constructor Detail
-
Caa
public Caa(Tcb tcb) throws CaaNotFound
Create a new Caa from the givenTcb. Note that not all Tcbs have a Caa associated with them.- Throws:
CaaNotFound- if there is no Caa associated with this Tcb.
-
-
Method Detail
-
getCaas
public static Caa[] getCaas(AddressSpace space)
Returns an array containing all of the Caas in the givenAddressSpace
-
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 IOExceptionGet 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 theRegisterSetfor 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 IOExceptionReturns the CEL level identifier.- Throws:
IOException- if an error occurred reading from the address space
-
ceecaa_stackdirection
public int ceecaa_stackdirection() throws IOExceptionReturns 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 IOExceptionReturns the address of the storage manager control block.- Throws:
IOException- if an error occurred reading from the address space
-
ceecaarcb
public long ceecaarcb() throws IOExceptionReturns the address of the region control block.- Throws:
IOException- if an error occurred reading from the address space
-
ceecaavba
public long ceecaavba() throws IOExceptionReturns 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 IOExceptionSearches 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 IOExceptionReturns the address of the enclave data block.- Throws:
IOException- if an error occurred reading from the address space
-
ceecaaerrcm
public long ceecaaerrcm() throws IOExceptionReturns the address of the hcom.- Throws:
IOException- if an error occurred reading from the address space
-
-