Package ghidra.app.util
Class CodeUnitInfo
- java.lang.Object
 - 
- ghidra.app.util.CodeUnitInfo
 
 
- 
public class CodeUnitInfo extends java.lang.ObjectContainer 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
Constructors Constructor Description CodeUnitInfo(int index)Constructor a new CodeUnitInfo. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getEOLComment()Get the EOL comment.java.lang.String[]getFunctionComments()Get the function comments.java.lang.StringgetFunctionName()Get the function name.java.lang.String[]getFunctionScopeSymbolNames()Get the names of the function scope symbols.SourceType[]getFunctionScopeSymbolSources()Get the sources of the function scope symbols.intgetIndex()Get the relative index for this CodeUnitInfo to add to a base address.java.lang.String[]getOtherSymbolNames()Get the names of the other symbols not in a function scope.SourceType[]getOtherSymbolSources()Get the sources of the other symbols not in a function scope.java.lang.String[]getPlateComment()Get the plate comment.java.lang.String[]getPostComment()Get the post comment.java.lang.String[]getPreComment()Get the pre comment.java.lang.StringgetPrimarySymbolName()Get the label; may be null.SourceTypegetPrimarySymbolSource()Get the label sourcejava.lang.String[]getRepeatableComment()Get the repeatable comment.int[]getStackOffsets()Get the stack offsets.int[]getStackVarFirstUseOffsets()Get the stack variable "First Use Offsets"java.lang.String[]getStackVariableComments()Get the stack variable comments.java.lang.String[]getStackVariableNames()Get the stack variable names.SourceType[]getStackVariableSources()Get the stack variable sources.Address[]getVarAddresses()Get the storage addresses corresponding to each non-stack variable.int[]getVarFirstUseOffsets()Get the non-stack variable "First Use Offsets"java.lang.String[]getVariableComments()Get the non-stack variable comments.java.lang.String[]getVariableNames()Get the non-stack variable names.SourceType[]getVariableSources()Get the non-stack variable sources.booleanhasDynamicSymbol()Return whether this CodeUnitInfo has a dynamic symbol.booleanhasSymbols()Return whether this CodeUnitInfo has symbols to copy.booleanisPrimarySymbolInFunctionScope()Is primary symbol in a function scopevoidsetComment(int commentType, java.lang.String[] comment)Set the comment to be transferred.voidsetFunction(Function function)Set the function info.voidsetSymbols(Symbol[] symbols)Set the symbols to be transferred. 
 - 
 
- 
- 
Method Detail
- 
setSymbols
public void setSymbols(Symbol[] symbols)
Set the symbols to be transferred. 
- 
setComment
public void setComment(int commentType, java.lang.String[] comment)Set the comment to be transferred.- Parameters:
 commentType- CodeUnit.PRE_COMMENT, POST_COMMENT, PLATE_COMMENT, EOL_COMMENT, or REPEATABLE.comment- comment
 
- 
setFunction
public void setFunction(Function function)
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
public java.lang.String getPrimarySymbolName()
Get the label; may be null. 
- 
getPrimarySymbolSource
public SourceType getPrimarySymbolSource()
Get the label source 
- 
isPrimarySymbolInFunctionScope
public boolean isPrimarySymbolInFunctionScope()
Is primary symbol in a function scope 
- 
getFunctionScopeSymbolNames
public java.lang.String[] getFunctionScopeSymbolNames()
Get the names of the function scope symbols. 
- 
getFunctionScopeSymbolSources
public SourceType[] getFunctionScopeSymbolSources()
Get the sources of the function scope symbols. 
- 
getOtherSymbolNames
public java.lang.String[] getOtherSymbolNames()
Get the names of the other symbols not in a function scope. 
- 
getOtherSymbolSources
public SourceType[] getOtherSymbolSources()
Get the sources of the other symbols not in a function scope. 
- 
getPlateComment
public java.lang.String[] getPlateComment()
Get the plate comment. 
- 
getPreComment
public java.lang.String[] getPreComment()
Get the pre comment. 
- 
getPostComment
public java.lang.String[] getPostComment()
Get the post comment. 
- 
getEOLComment
public java.lang.String[] getEOLComment()
Get the EOL comment. 
- 
getRepeatableComment
public java.lang.String[] getRepeatableComment()
Get the repeatable comment. 
- 
getFunctionName
public java.lang.String getFunctionName()
Get the function name. 
- 
getFunctionComments
public java.lang.String[] getFunctionComments()
Get the function comments. 
- 
getStackVariableNames
public java.lang.String[] getStackVariableNames()
Get the stack variable names. 
- 
getStackVariableSources
public SourceType[] 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
public java.lang.String[] getStackVariableComments()
Get the stack variable comments. 
- 
getVariableNames
public java.lang.String[] getVariableNames()
Get the non-stack variable names. 
- 
getVariableSources
public SourceType[] getVariableSources()
Get the non-stack variable sources. 
- 
getVarAddresses
public Address[] getVarAddresses()
Get the storage addresses corresponding to each non-stack variable. 
- 
getVarFirstUseOffsets
public int[] getVarFirstUseOffsets()
Get the non-stack variable "First Use Offsets" 
- 
getVariableComments
public java.lang.String[] getVariableComments()
Get the non-stack variable comments. 
 - 
 
 -