java.lang.Object
ghidra.app.plugin.exceptionhandlers.gcc.GccAnalysisClass
ghidra.app.plugin.exceptionhandlers.gcc.structures.ehFrame.Cie

public class Cie extends GccAnalysisClass
A Common Information Entry (CIE) holds information that is shared among many Frame Description Entries (FDEs). There is at least one CIE in every non-empty .debug_frame section.

The structures modeled here are described in detail in the C++ ABI.

  • Constructor Details

    • Cie

      public Cie(TaskMonitor monitor, Program program)
      Creates a common information entry object that is not in the debug frame section.

      Note: The create(Address) method must be called after constructing a Cie to associate it with an address before any of its "process..." methods are called.

      Parameters:
      monitor - task monitor to see if the user has cancelled analysis.
      program - the program containing the CIE.
    • Cie

      public Cie(TaskMonitor monitor, Program program, boolean isInDebugFrame)
      Creates a common information entry object.

      Note: The create(Address) method must be called after constructing a Cie to associate it with an address before any of its "process..." methods are called.

      Parameters:
      monitor - task monitor to see if the user has cancelled analysis.
      program - the program containing the CIE.
      isInDebugFrame - true if this CIE is in the debug frame section
  • Method Details

    • isInDebugFrame

      public boolean isInDebugFrame()
      Determines if this CIE is in the debug frame section.
      Returns:
      true if in the debug frame section.
    • create

      public void create(Address cieAddress) throws MemoryAccessException, ExceptionHandlerFrameException
      Creates a Common Information Entry (CIE) at cieAddress.
      Note: This method must get called before any of the "get..." methods.
      Parameters:
      cieAddress - the address where the CIE should be created.
      Throws:
      MemoryAccessException - if memory for the CIE couldn't be read.
      ExceptionHandlerFrameException - if some of the CIE information couldn't be created.
    • getNextAddress

      public Address getNextAddress()
      Method that returns the address immediately following the Common Information Entry
      Returns:
      Address immediately following the CIE
    • getAugmentationString

      public String getAugmentationString()
      Gets the augmentation string which indicates optional fields and how to interpret them.
      Returns:
      the augmentation string.
    • getFDEEncoding

      public int getFDEEncoding()
      Gets the indicator for the FDE address pointer encoding.
      Returns:
      the FDE address pointer encoding.
    • getFDEDecoder

      public DwarfEHDecoder getFDEDecoder()
      Gets the decoder for the FDE that is associated with this CIE.
      Returns:
      the decoder for the FDE
    • getLSDAEncoding

      public int getLSDAEncoding()
      Gets the indicator for the LSDA pointer encoding.
      Returns:
      the LSDA pointer encoding.
    • getLSDADecoder

      public DwarfEHDecoder getLSDADecoder()
      Gets the decoder for the LSDA that is associated with this CIE.
      Returns:
      the decoder for the LSDA
    • getAddress

      public Address getAddress()
      Gets the address where this CIE is located in the program.
      Returns:
      the address of this CIE.
    • getDataAlignment

      public int getDataAlignment()
      Gets the value of the data alignment factor for this CIE record.
      Returns:
      the data alignment factor
    • getCodeAlignment

      public int getCodeAlignment()
      Gets the value of the code alignment factor for this CIE record.
      Returns:
      the code alignment factor
    • isEndOfFrame

      public boolean isEndOfFrame()
      Determines if this CIE encountered a zero length record, which indicates the end of the frame.
      Returns:
      true if we are at end of frame due to encountering a zero length record.
    • getSegmentSize

      public int getSegmentSize()
      Gets the segment size for this CIE record.
      Returns:
      the segment size
    • getReturnAddressRegisterColumn

      public int getReturnAddressRegisterColumn()
      Gets the return address register column for this CIE record.
      Returns:
      the return address register column
    • getCieId

      public int getCieId()
      Gets the ID for this CIE record.
      Returns:
      the CIE identifier