Class StatementProgramPrologue
- java.lang.Object
-
- ghidra.app.util.bin.format.dwarf.line.StatementProgramPrologue
-
public class StatementProgramPrologue extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static int
PRE_PROLOGUE_LEN
static int
TOTAL_LENGTH_FIELD_LEN
-
Constructor Summary
Constructors Constructor Description StatementProgramPrologue(BinaryReader reader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDirectoryByIndex(ghidra.app.util.bin.format.dwarf.line.LEB128 directoryIndex)
The directory index represents an entry in the include directories section.FileEntry
getFileNameByIndex(int fileIndex)
Returns the file entry at the given index.java.util.List<FileEntry>
getFileNames()
java.util.List<java.lang.String>
getIncludeDirectories()
int
getLineBase()
Returns the line base value.int
getLineRange()
Returns the line range value.int
getMinimumInstructionLength()
Returns the size in bytes of the smallest target machine instruction.int
getOpcodeBase()
Returns the number assigned to the first special opcode.int
getPrologueLength()
Returns the number of bytes following the prologue_length field to the beginning of the first byte of the statement program itself.byte[]
getStandardOpcodeLengths()
return the array for each of the standard opcodesint
getTotalLength()
Returns the size in bytes of the statement information for this compilation unit (not including the total_length field itself).int
getVersion()
Returns the version identifier for the statement information format.boolean
isDefaultIsStatement()
Returns the initial value of the is_stmt register.
-
-
-
Field Detail
-
TOTAL_LENGTH_FIELD_LEN
public static final int TOTAL_LENGTH_FIELD_LEN
- See Also:
- Constant Field Values
-
PRE_PROLOGUE_LEN
public static final int PRE_PROLOGUE_LEN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
StatementProgramPrologue
public StatementProgramPrologue(BinaryReader reader) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
getTotalLength
public int getTotalLength()
Returns the size in bytes of the statement information for this compilation unit (not including the total_length field itself).- Returns:
- size in bytes of the statement information
-
getVersion
public int getVersion()
Returns the version identifier for the statement information format.- Returns:
- the version identifier for the statement information format
-
getPrologueLength
public int getPrologueLength()
Returns the number of bytes following the prologue_length field to the beginning of the first byte of the statement program itself.- Returns:
- the number of bytes following the prologue_length
-
getMinimumInstructionLength
public int getMinimumInstructionLength()
Returns the size in bytes of the smallest target machine instruction. Statement program opcodes that alter the address register first multiply their operands by this value.- Returns:
- the size in bytes of the smallest target machine instruction
-
isDefaultIsStatement
public boolean isDefaultIsStatement()
Returns the initial value of the is_stmt register.- Returns:
- the initial value of the is_stmt register
-
getLineBase
public int getLineBase()
Returns the line base value. This parameter affects the meaning of the special opcodes. See below.- Returns:
- the line base value
-
getLineRange
public int getLineRange()
Returns the line range value. This parameter affects the meaning of the special opcodes. See below.- Returns:
- the line range value
-
getOpcodeBase
public int getOpcodeBase()
Returns the number assigned to the first special opcode.- Returns:
- the number assigned to the first special opcode
-
getStandardOpcodeLengths
public byte[] getStandardOpcodeLengths()
return the array for each of the standard opcodes- Returns:
- the array for each of the standard opcodes
-
getIncludeDirectories
public java.util.List<java.lang.String> getIncludeDirectories()
- Returns:
- each path that was searched for included source files
-
getFileNames
public java.util.List<FileEntry> getFileNames()
- Returns:
- an entry for each source file that contributed to the statement
-
getFileNameByIndex
public FileEntry getFileNameByIndex(int fileIndex)
Returns the file entry at the given index.- Parameters:
fileIndex
- the file index- Returns:
- the file entry at the given index
-
getDirectoryByIndex
public java.lang.String getDirectoryByIndex(ghidra.app.util.bin.format.dwarf.line.LEB128 directoryIndex)
The directory index represents an entry in the include directories section. If the directoryIndex is LEB128(0), then the file was found in the current directory.- Parameters:
directoryIndex
- the directory index- Returns:
- the directory or current directory
-
-