Package ghidra.app.util.bin.format.pe

# Class TLSDirectory

java.lang.Object
ghidra.app.util.bin.format.pe.TLSDirectory

All Implemented Interfaces:
  `StructConverter`

public class TLSDirectory extends Object implements StructConverter
A class to represent the IMAGE_TLS_DIRECTORY32 and IMAGE_TLS_DIRECTORY64 data structures.

     typedef struct _IMAGE_TLS_DIRECTORY32 {
         DWORD   StartAddressOfRawData;
         DWORD   EndAddressOfRawData;
         DWORD   AddressOfIndex;             // PDWORD
         DWORD   AddressOfCallBacks;         // PIMAGE_TLS_CALLBACK *
         DWORD   SizeOfZeroFill;
         DWORD   Characteristics;
     } IMAGE_TLS_DIRECTORY32;
     typedef IMAGE_TLS_DIRECTORY32 * PIMAGE_TLS_DIRECTORY32;

     typedef struct _IMAGE_TLS_DIRECTORY64 {
         ULONGLONG   StartAddressOfRawData;
         ULONGLONG   EndAddressOfRawData;
         PDWORD      AddressOfIndex;
         PIMAGE_TLS_CALLBACK * AddressOfCallBacks;
         DWORD       SizeOfZeroFill;
         DWORD       Characteristics;
     } IMAGE_TLS_DIRECTORY64;
     typedef IMAGE_TLS_DIRECTORY64 * PIMAGE_TLS_DIRECTORY64;

- ## Field Summary

  ### Fields inherited from interface ghidra.app.util.bin.StructConverter

  `ASCII, BYTE, DWORD, IBO32, IBO64, POINTER, QWORD, SLEB128, STRING, ULEB128, UTF16, UTF8, VOID, WORD`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `long`
  `getAddressOfCallBacks()`
  `long`
  `getAddressOfIndex()`
  `int`
  `getCharacteristics()`
  Reserved, currently set to 0.
  `long`
  `getEndAddressOfRawData()`
  Returns the ending address of the range of memory used to initialize a new thread's TLS data in memory.
  `String`
  `getName()`
  Returns the name of the structure.
  `int`
  `getSizeOfZeroFill()`
  `long`
  `getStartAddressOfRawData()`
  Returns the beginning address of a range of memory used to initialize a new thread's TLS data in memory.
  `DataType`
  `toDataType()`
  Returns a structure datatype representing the contents of the implementor of this interface.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### getStartAddressOfRawData

    public long getStartAddressOfRawData()
    Returns the beginning address of a range of memory used to initialize a new thread's TLS data in memory.
    Returns:
      the beginning address of a range of memory used to initialize a new thread's TLS data in memory.

  - ### getEndAddressOfRawData

    public long getEndAddressOfRawData()
    Returns the ending address of the range of memory used to initialize a new thread's TLS data in memory.
    Returns:
      the ending address of the range of memory used to initialize a new thread's TLS data in memory.

  - ### getAddressOfIndex

    public long getAddressOfIndex()
    Returns:
      the index to locate the thread local data.

  - ### getAddressOfCallBacks

    public long getAddressOfCallBacks()
    Returns:
      the address of an array of `PIMAGE_TLS_CALLBACK` function pointers

  - ### getSizeOfZeroFill

    public int getSizeOfZeroFill()
    Returns:
      the size in bytes of the initialization data

  - ### getCharacteristics

    public int getCharacteristics()
    Reserved, currently set to 0.
    Returns:
      reserved, currently set to 0

  - ### toDataType

    public DataType toDataType() throws DuplicateNameException
    Description copied from interface: `StructConverter`
    Returns a structure datatype representing the contents of the implementor of this interface.

    For example, given:

         class A {
             int foo;
             double bar;
         }

    The return value should be a structure data type with two data type components; an INT and a DOUBLE. The structure should contain field names and, if possible, field comments.

    Specified by:
      `toDataType` in interface `StructConverter`
    Returns:
      returns a structure datatype representing the implementor of this interface
    Throws:
      `DuplicateNameException` - when a datatype of the same name already exists
    See Also:
      - `StructureDataType`

  - ### getName

    public String getName()
    Returns the name of the structure.
    Returns:
      the name of the structure