java.lang.Object
com.ibm.j9ddr.corereaders.elf.unwind.Unwind
Class for parsing the unwind information from a .eh_frame header
It creates a list of FDE's (Frame Description Entry) objects and
the associated CIE's (Common Information Entry) for the process
when created.
It can then be used to get the unwind table for a given instruction
address. The table can then be applied to the current register state
to create the previous register state (or at least the register state
that matters for further unwinding.)
See:
http://refspecs.linuxfoundation.org/LSB_3.0.0/LSB-Core-generic/LSB-Core-generic/ehframechpt.html
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionUnwind
(LinuxProcessAddressSpace _process) Create an unwinder for a process. eh_frame information is added later when the program header entries containing it are found. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCallFrameInformation
(long libraryBaseAddress, ProgramHeaderEntry ph, String libName) getUnwindTableForInstructionAddress
(long instructionPointer) static long
readSignedLEB128
(ImageInputStream cfiStream) static long
readUnsignedLEB128
(ImageInputStream cfiStream)
-
Constructor Details
-
Unwind
Create an unwinder for a process. eh_frame information is added later when the program header entries containing it are found.- Parameters:
_process
- The process the unwinder will work with.
-
-
Method Details
-
addCallFrameInformation
public void addCallFrameInformation(long libraryBaseAddress, ProgramHeaderEntry ph, String libName) throws CorruptDataException, IOException - Throws:
CorruptDataException
IOException
-
readUnsignedLEB128
- Throws:
IOException
-
readSignedLEB128
- Throws:
IOException
-
getUnwindTableForInstructionAddress
public UnwindTable getUnwindTableForInstructionAddress(long instructionPointer) throws CorruptDataException, IOException - Throws:
CorruptDataException
IOException
-