Class GoModuledata
java.lang.Object
ghidra.app.util.bin.format.golang.rtti.GoModuledata
- All Implemented Interfaces:
StructureMarkup<GoModuledata>
Represents a Go moduledata structure, which contains a lot of valuable bootstrapping
data for RTTI and function data.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadditionalMarkup(MarkupSession session) Called to allow the implementor to perform custom markup of itself.booleancontainsFuncDataInstance(long offset) Returns true if this GoModuleData is the module data that contains the specified GoFuncData structure.Returns a list of all functions contained in this module.getCutab()Returns the cutab slice.Returns the filetab slice.getFuncDataInstance(long offset) Reads aGoFuncDatastructure from the pclntable.Returns a slice that contains all the function names.Returns an artificial slice of the functab entries that are valid.Returns a reference to the controllingGo binarycontext.longReturns the offset of the gofunc location.getItabs()Returns list of the GoItabs present in this module.Returns the pclntable slice.getPctab()Returns the pctab slice.getText()Returns the address of the beginning of the text section.Returns list of locations of the types contained in this module.longReturns the ending offset of type info.longReturns the starting offset of type info.booleanisValid()Returns true if this module data structure contains sane values.booleanmatchesPcHeader(GoPcHeader otherPcHeader) Compares the data in this structure to fields in a GoPcHeader and returns true if they match.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.app.util.bin.format.golang.structmapping.StructureMarkup
getExternalInstancesToMarkup, getStructureLabel, getStructureName, getStructureNamespace
-
Constructor Details
-
GoModuledata
public GoModuledata()
-
-
Method Details
-
matchesPcHeader
Compares the data in this structure to fields in a GoPcHeader and returns true if they match.- Parameters:
otherPcHeader- GoPcHeader instance- Returns:
- boolean true if match, false if no match
-
getPcHeader
- Throws:
IOException
-
getPcHeaderAddress
-
getText
Returns the address of the beginning of the text section.- Returns:
- the address of the beginning of the text section
-
getTextRange
-
getRoDataRange
-
getDataRange
-
getUninitializedDataRange
-
getUninitializedNoPtrDataRange
-
getTypesOffset
public long getTypesOffset()Returns the starting offset of type info.- Returns:
- the starting offset of type info
-
getTypesEndOffset
public long getTypesEndOffset()Returns the ending offset of type info.- Returns:
- the ending offset of type info
-
getGofunc
public long getGofunc()Returns the offset of the gofunc location.- Returns:
- the offset of the gofunc location
-
getFuncDataInstance
Reads aGoFuncDatastructure from the pclntable.- Parameters:
offset- relative to the pclntable- Returns:
GoFuncData- Throws:
IOException- if error reading data
-
containsFuncDataInstance
public boolean containsFuncDataInstance(long offset) Returns true if this GoModuleData is the module data that contains the specified GoFuncData structure.- Parameters:
offset- offset of a GoFuncData structure- Returns:
- true if this GoModuleData is the module data that contains the specified GoFuncData structure
-
getFunctabEntriesSlice
Returns an artificial slice of the functab entries that are valid.- Returns:
- an artificial slice of the functab entries that are valid
-
isValid
public boolean isValid()Returns true if this module data structure contains sane values.- Returns:
- true if this module data structure contains sane values
-
getFuncnametab
Returns a slice that contains all the function names.- Returns:
- a slice that contains all the function names
-
getAllFunctionData
Returns a list of all functions contained in this module.- Returns:
- a list of all functions contained in this module
- Throws:
IOException- if error reading data
-
getCutab
Returns the cutab slice.- Returns:
- the cutab slice
-
getFiletab
Returns the filetab slice.- Returns:
- the filetab slice
-
getPclntable
Returns the pclntable slice.- Returns:
- the pclntable slice
-
getPctab
Returns the pctab slice.- Returns:
- the pctab slice
-
getPcValueTable
-
getGoBinary
Returns a reference to the controllingGo binarycontext.- Returns:
- a reference to the controlling
Go binarycontext
-
getStructureContext
- Specified by:
getStructureContextin interfaceStructureMarkup<GoModuledata>
-
additionalMarkup
Description copied from interface:StructureMarkupCalled to allow the implementor to perform custom markup of itself.- Specified by:
additionalMarkupin interfaceStructureMarkup<GoModuledata>- Parameters:
session- state and methods to assist marking up the program- Throws:
IOException- if error during markupCancelledException- if cancelled
-
getItabs
Returns list of the GoItabs present in this module.- Returns:
- list of the GoItabs present in this module
- Throws:
IOException- if error reading data
-
getTypeList
Returns list of locations of the types contained in this module.- Returns:
- list of locations of the types contained in this module
- Throws:
IOException- if error reading data
-