Class GoModuledata
java.lang.Object
ghidra.app.util.bin.format.golang.rtti.GoModuledata
- All Implemented Interfaces:
StructureMarkup<GoModuledata>
Represents a golang moduledata structure, which contains a lot of valuable bootstrapping
data for RTTI and function data.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
additionalMarkup
(MarkupSession session) Called to allow the implementor to perform custom markup of itself.boolean
containsFuncDataInstance
(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 aGoFuncData
structure 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 binary
context.long
Return the offset of the gofunc locationgetItabs()
Returns a list of the GoItabs present in this module.getPctab()
Returns the pctab slice.getText()
Returns the address of the beginning of the text section.Returns a list of locations of the types contained in this module.long
Returns the ending offset of type infolong
Returns the starting offset of type infoboolean
isValid()
Returns true if this module data structure contains sane values.Returns an iterator that walks all the types contained in this moduleboolean
matchesPcHeader
(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, wait
Methods 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:
- address of the beginning of the text section
-
getTextRange
-
getRoDataRange
-
getDataRange
-
getTypesOffset
public long getTypesOffset()Returns the starting offset of type info- Returns:
- starting offset of type info
-
getTypesEndOffset
public long getTypesEndOffset()Returns the ending offset of type info- Returns:
- ending offset of type info
-
getGofunc
public long getGofunc()Return the offset of the gofunc location- Returns:
- offset of the gofunc location
-
getFuncDataInstance
Reads aGoFuncData
structure 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:
- 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:
- slice that contains all the function names
-
getAllFunctionData
Returns a list of all functions contained in this module.- Returns:
- list of all functions contained in this module
- Throws:
IOException
- if error reading data
-
getCutab
Returns the cutab slice.- Returns:
- cutab slice
-
getFiletab
Returns the filetab slice.- Returns:
- filetab slice
-
getPclntable
-
getPctab
Returns the pctab slice.- Returns:
- pctab slice
-
getPcValueTable
-
getGoBinary
Returns a reference to the controllinggo binary
context.- Returns:
- reference to the controlling
go binary
context
-
getStructureContext
- Specified by:
getStructureContext
in interfaceStructureMarkup<GoModuledata>
-
additionalMarkup
Description copied from interface:StructureMarkup
Called to allow the implementor to perform custom markup of itself.- Specified by:
additionalMarkup
in interfaceStructureMarkup<GoModuledata>
- Parameters:
session
- state and methods to assist marking up the program- Throws:
IOException
- if error during markupCancelledException
- if cancelled
-
getItabs
Returns a list of the GoItabs present in this module.- Returns:
- list of the GoItabs present in this module
- Throws:
IOException
- if error reading data
-
iterateTypes
Returns an iterator that walks all the types contained in this module- Returns:
- iterator that walks all the types contained in this module
- Throws:
IOException
- if error reading data
-
getTypeList
Returns a list of locations of the types contained in this module.- Returns:
- list of addresses of GoType structures
- Throws:
IOException
- if error reading data
-