Package ghidra.app.decompiler
Class DecompilerLocation
java.lang.Object
ghidra.program.util.ProgramLocation
ghidra.app.decompiler.DecompilerLocation
- All Implemented Interfaces:
Cloneable
,Comparable<ProgramLocation>
-
Field Summary
Fields inherited from class ghidra.program.util.ProgramLocation
addr, program, refAddr
-
Constructor Summary
ConstructorDescriptionDefault constructor required for restoring a program location from XML.DecompilerLocation
(Program program, Address address, Address functionEntryPoint, DecompileResults results, ClangToken token, int lineNumber, int charPos) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Results from the decompilationint
getToken()
C text token at the current cursor locationint
hashCode()
void
restoreState
(Program program1, SaveState obj) Restore this program location using the given program and save state object.void
Save this program location to the given save state object.toString()
Methods inherited from class ghidra.program.util.ProgramLocation
clone, compareAddr, compareTo, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow, getTranslatedCopy, isValid
-
Constructor Details
-
DecompilerLocation
public DecompilerLocation(Program program, Address address, Address functionEntryPoint, DecompileResults results, ClangToken token, int lineNumber, int charPos) -
DecompilerLocation
public DecompilerLocation()Default constructor required for restoring a program location from XML.
-
-
Method Details
-
getFunctionEntryPoint
-
getDecompile
Results from the decompilation- Returns:
- C-AST, DFG, and CFG object. null if there are no results attached to this location
-
getToken
C text token at the current cursor location- Returns:
- token at this location, could be null if there are no decompiler results
-
getTokenName
-
hashCode
public int hashCode()- Overrides:
hashCode
in classProgramLocation
-
equals
- Overrides:
equals
in classProgramLocation
-
saveState
Description copied from class:ProgramLocation
Save this program location to the given save state object.- Overrides:
saveState
in classProgramLocation
- Parameters:
saveState
- the save state object for saving the location
-
restoreState
Description copied from class:ProgramLocation
Restore this program location using the given program and save state object.- Overrides:
restoreState
in classProgramLocation
- Parameters:
program1
- program to restore fromobj
- the save state to restore from
-
getLineNumber
public int getLineNumber() -
getCharPos
public int getCharPos() -
toString
- Overrides:
toString
in classProgramLocation
-