Class Cie
- 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 Summary
Constructors Constructor Description Cie(TaskMonitor monitor, Program program)
Creates a common information entry object that is not in the debug frame section.Cie(TaskMonitor monitor, Program program, boolean isInDebugFrame)
Creates a common information entry object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
create(Address cieAddress)
Creates a Common Information Entry (CIE) atcieAddress
.Address
getAddress()
Gets the address where this CIE is located in the program.java.lang.String
getAugmentationString()
Gets the augmentation string which indicates optional fields and how to interpret them.int
getCieId()
Gets the ID for this CIE record.int
getCodeAlignment()
Gets the value of the code alignment factor for this CIE record.int
getDataAlignment()
Gets the value of the data alignment factor for this CIE record.DwarfEHDecoder
getFDEDecoder()
Gets the decoder for the FDE that is associated with this CIE.int
getFDEEncoding()
Gets the indicator for the FDE address pointer encoding.DwarfEHDecoder
getLSDADecoder()
Gets the decoder for the LSDA that is associated with this CIE.int
getLSDAEncoding()
Gets the indicator for the LSDA pointer encoding.Address
getNextAddress()
Method that returns the address immediately following the Common Information Entryint
getReturnAddressRegisterColumn()
Gets the return address register column for this CIE record.int
getSegmentSize()
Gets the segment size for this CIE record.boolean
isEndOfFrame()
Determines if this CIE encountered a zero length record, which indicates the end of the frame.boolean
isInDebugFrame()
Determines if this CIE is in the debug frame section.-
Methods inherited from class ghidra.app.plugin.exceptionhandlers.gcc.GccAnalysisClass
createAndCommentData, createData, init
-
-
-
-
Constructor Detail
-
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 aCie
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 aCie
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 Detail
-
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) atcieAddress
.
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 java.lang.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
-
-