Package ghidra.app.decompiler.location
Class VariableDecompilerLocation
java.lang.Object
ghidra.program.util.ProgramLocation
ghidra.program.util.FunctionLocation
ghidra.program.util.VariableLocation
ghidra.program.util.VariableLocFieldLocation
ghidra.app.decompiler.location.VariableDecompilerLocation
- All Implemented Interfaces:
DecompilerLocation,Cloneable,Comparable<ProgramLocation>
public class VariableDecompilerLocation
extends VariableLocFieldLocation
implements DecompilerLocation
A location created when a function variable is clicked in the Decompiler.
-
Field Summary
Fields inherited from class ghidra.program.util.FunctionLocation
functionAddrFields inherited from class ghidra.program.util.ProgramLocation
addr, program, refAddr -
Constructor Summary
ConstructorsConstructorDescriptionVariableDecompilerLocation(Program program, Address locationAddr, Variable var, DecompilerLocationInfo info) -
Method Summary
Modifier and TypeMethodDescriptionbooleanintReturns the character position.Results from the decompilationintReturns the line number.getToken()C text token at the current cursor locationReturns the name of the token for the current location.inthashCode()voidrestoreState(Program p, SaveState ss) Restore this function location using the given program and save state object.voidSave this function location to the given save state object.Methods inherited from class ghidra.program.util.VariableLocFieldLocation
getLocMethods inherited from class ghidra.program.util.VariableLocation
compareTo, getVariable, isLocationFor, isParameter, isReturn, isValid, toStringMethods inherited from class ghidra.program.util.FunctionLocation
getFunctionAddressMethods inherited from class ghidra.program.util.ProgramLocation
clone, compareAddr, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow, getTranslatedCopy
-
Constructor Details
-
VariableDecompilerLocation
public VariableDecompilerLocation(Program program, Address locationAddr, Variable var, DecompilerLocationInfo info) -
VariableDecompilerLocation
public VariableDecompilerLocation()
-
-
Method Details
-
getFunctionEntryPoint
- Specified by:
getFunctionEntryPointin interfaceDecompilerLocation
-
getDecompile
Description copied from interface:DecompilerLocationResults from the decompilation- Specified by:
getDecompilein interfaceDecompilerLocation- Returns:
- C-AST, DFG, and CFG object. null if there are no results attached to this location
-
getToken
Description copied from interface:DecompilerLocationC text token at the current cursor location- Specified by:
getTokenin interfaceDecompilerLocation- Returns:
- token at this location, could be null if there are no decompiler results
-
getTokenName
Description copied from interface:DecompilerLocationReturns the name of the token for the current location.- Specified by:
getTokenNamein interfaceDecompilerLocation- Returns:
- the name of the token for the current location
-
getLineNumber
public int getLineNumber()Description copied from interface:DecompilerLocationReturns the line number.- Specified by:
getLineNumberin interfaceDecompilerLocation- Returns:
- the line number
-
getCharPos
public int getCharPos()Description copied from interface:DecompilerLocationReturns the character position.- Specified by:
getCharPosin interfaceDecompilerLocation- Returns:
- the character position
-
saveState
Description copied from class:FunctionLocationSave this function location to the given save state object.- Overrides:
saveStatein classVariableLocFieldLocation- Parameters:
ss- the save state object for saving the location
-
restoreState
Description copied from class:FunctionLocationRestore this function location using the given program and save state object.- Overrides:
restoreStatein classVariableLocFieldLocation- Parameters:
p- the program containing the function locationss- the save state object for saving the location
-
hashCode
public int hashCode()- Overrides:
hashCodein classVariableLocFieldLocation
-
equals
- Overrides:
equalsin classVariableLocFieldLocation
-