Package ghidra.app.util
Class CodeUnitInfo
java.lang.Object
ghidra.app.util.CodeUnitInfo
Container object to keep a relative index, label, and comments. Used
in a list for copying/pasting labels and comments from one program to
another.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionString[]
Get the EOL comment.String[]
Get the function comments.Get the function name.String[]
Get the names of the function scope symbols.Get the sources of the function scope symbols.int
getIndex()
Get the relative index for this CodeUnitInfo to add to a base address.String[]
Get the names of the other symbols not in a function scope.Get the sources of the other symbols not in a function scope.String[]
Get the plate comment.String[]
Get the post comment.String[]
Get the pre comment.Get the label; may be null.Get the label sourceString[]
Get the repeatable comment.int[]
Get the stack offsets.int[]
Get the stack variable "First Use Offsets"String[]
Get the stack variable comments.String[]
Get the stack variable names.Get the stack variable sources.Address[]
Get the storage addresses corresponding to each non-stack variable.int[]
Get the non-stack variable "First Use Offsets"String[]
Get the non-stack variable comments.String[]
Get the non-stack variable names.Get the non-stack variable sources.boolean
Return whether this CodeUnitInfo has a dynamic symbol.boolean
Return whether this CodeUnitInfo has symbols to copy.boolean
Is primary symbol in a function scopevoid
setComment
(int commentType, String[] comment) Set the comment to be transferred.void
setFunction
(Function function) Set the function info.void
setSymbols
(Symbol[] symbols) Set the symbols to be transferred.
-
Constructor Details
-
CodeUnitInfo
public CodeUnitInfo(int index) Constructor a new CodeUnitInfo.- Parameters:
index
- relative index added to a base address for where this information will be placed
-
-
Method Details
-
setSymbols
Set the symbols to be transferred. -
setComment
Set the comment to be transferred.- Parameters:
commentType
- CodeUnit.PRE_COMMENT, POST_COMMENT, PLATE_COMMENT, EOL_COMMENT, or REPEATABLE.comment
- comment
-
setFunction
Set the function info.- Parameters:
function
- function used to get function info to transfer
-
getIndex
public int getIndex()Get the relative index for this CodeUnitInfo to add to a base address. -
hasSymbols
public boolean hasSymbols()Return whether this CodeUnitInfo has symbols to copy. -
hasDynamicSymbol
public boolean hasDynamicSymbol()Return whether this CodeUnitInfo has a dynamic symbol. -
getPrimarySymbolName
Get the label; may be null. -
getPrimarySymbolSource
Get the label source -
isPrimarySymbolInFunctionScope
public boolean isPrimarySymbolInFunctionScope()Is primary symbol in a function scope -
getFunctionScopeSymbolNames
Get the names of the function scope symbols. -
getFunctionScopeSymbolSources
Get the sources of the function scope symbols. -
getOtherSymbolNames
Get the names of the other symbols not in a function scope. -
getOtherSymbolSources
Get the sources of the other symbols not in a function scope. -
getPlateComment
Get the plate comment. -
getPreComment
Get the pre comment. -
getPostComment
Get the post comment. -
getEOLComment
Get the EOL comment. -
getRepeatableComment
Get the repeatable comment. -
getFunctionName
Get the function name. -
getFunctionComments
Get the function comments. -
getStackVariableNames
Get the stack variable names. -
getStackVariableSources
Get the stack variable sources. -
getStackOffsets
public int[] getStackOffsets()Get the stack offsets. -
getStackVarFirstUseOffsets
public int[] getStackVarFirstUseOffsets()Get the stack variable "First Use Offsets" -
getStackVariableComments
Get the stack variable comments. -
getVariableNames
Get the non-stack variable names. -
getVariableSources
Get the non-stack variable sources. -
getVarAddresses
Get the storage addresses corresponding to each non-stack variable. -
getVarFirstUseOffsets
public int[] getVarFirstUseOffsets()Get the non-stack variable "First Use Offsets" -
getVariableComments
Get the non-stack variable comments.
-