Package ghidra.app.services
Interface GoToService
-
- All Known Implementing Classes:
GoToServiceImpl
public interface GoToService
The GoToService provides a general service for plugins to generate GoTo events. The provider of this service will take care of interfacing with any history service that may be available.
-
-
Field Summary
Fields Modifier and Type Field Description static char[]
VALID_GOTO_CHARS
Characters that are allowed in words that the GoToService can use.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Navigatable
getDefaultNavigatable()
GoToOverrideService
getOverrideService()
boolean
goTo(Navigatable navigatable, Address goToAddress)
boolean
goTo(Navigatable navigatable, Program program, Address address, Address refAddress)
boolean
goTo(Navigatable navigatable, ProgramLocation loc, Program program)
boolean
goTo(Address goToAddress)
Generates a GoTo event to the gotoAddress.boolean
goTo(Address currentAddress, Address goToAddress)
Generates a GoTo event to the goToAddress or symbol.boolean
goTo(Address goToAddress, Program program)
Generates a GoTo event to the gotoAddress.boolean
goTo(ProgramLocation loc)
Generates a GoTo event and handles any history state that needs to be saved.boolean
goTo(ProgramLocation loc, Program program)
Generates a GoTo event and handles any history state that needs to be saved.boolean
goToExternalLocation(Navigatable navigatable, ExternalLocation externalLoc, boolean checkNavigationOption)
Navigate to either the external program location or address linkage location.boolean
goToExternalLocation(ExternalLocation externalLoc, boolean checkNavigationOption)
Navigate to either the external program location or address linkage location.boolean
goToQuery(Navigatable navigatable, Address fromAddr, QueryData queryData, GoToServiceListener listener, TaskMonitor monitor)
boolean
goToQuery(Address fromAddr, QueryData queryData, GoToServiceListener listener, TaskMonitor monitor)
Parses the input string as either: an address/symbol expression (0x1000+5, or LAB1000+5) a symbol wildcard expression (LAB*, LAB?100) a symbol lookup an address lookup If the query results in more than one location, a list of locations will be displayed.void
setOverrideService(GoToOverrideService override)
-
-
-
Method Detail
-
goTo
boolean goTo(ProgramLocation loc)
Generates a GoTo event and handles any history state that needs to be saved. This method will attempt to find the program that contains the given ProgramLocation.- Parameters:
loc
- location to go to- Returns:
- true if the go to was successful
- See Also:
goTo(ProgramLocation, Program)
-
goTo
boolean goTo(ProgramLocation loc, Program program)
Generates a GoTo event and handles any history state that needs to be saved. This overloaded version ofgoTo(Address)
uses the given program as the program within which to perform the GoTo. If the given program does not contain the given address, then the GoTo will not be performed and false will be returned. Passing null as the program parameter will cause this method to attempt to find a program that contains the given ProgramLocation.- Parameters:
loc
- location to go toprogram
- the program within which to perform the GoTo- Returns:
- true if the go to was successful
- See Also:
goTo(ProgramLocation)
-
goTo
boolean goTo(Navigatable navigatable, ProgramLocation loc, Program program)
-
goTo
boolean goTo(Navigatable navigatable, Program program, Address address, Address refAddress)
-
goTo
boolean goTo(Address currentAddress, Address goToAddress)
Generates a GoTo event to the goToAddress or symbol. The currentAddress is used to determine if there is a specific symbol reference from the current address.- Parameters:
currentAddress
- the current addressgoToAddress
- the address to goto- Returns:
- true if the go to was successful
-
goTo
boolean goTo(Navigatable navigatable, Address goToAddress)
-
goTo
boolean goTo(Address goToAddress)
Generates a GoTo event to the gotoAddress.- Parameters:
goToAddress
- the address to goto- Returns:
- true if the go to was successful
- See Also:
goTo(Address, Program)
-
goTo
boolean goTo(Address goToAddress, Program program)
Generates a GoTo event to the gotoAddress. This overloaded version ofgoTo(Address)
uses the given program as the program within which to perform the GoTo. If the given program does not contain the given address, then the GoTo will not be performed and false will be returned. Passing null as the program parameter will cause this method to attempt to find a program that contains the given ProgramLocation.- Parameters:
goToAddress
- the address to gotoprogram
- the program within which to perform the GoTo- Returns:
- true if the go to was successful
- See Also:
goTo(Address)
-
goToExternalLocation
boolean goToExternalLocation(ExternalLocation externalLoc, boolean checkNavigationOption)
Navigate to either the external program location or address linkage location. Specific behavior may vary based upon implementation.- Parameters:
externalLoc
- external locationcheckNavigationOption
- if true the service navigation option will be used to determine if navigation to the external program will be attempted, or if navigation to the external linkage location within the current program will be attempted. If false, the implementations default behavior will be performed.- Returns:
- true if either navigation to the external program or to a linkage location was completed successfully.
-
goToExternalLocation
boolean goToExternalLocation(Navigatable navigatable, ExternalLocation externalLoc, boolean checkNavigationOption)
Navigate to either the external program location or address linkage location. Specific behavior may vary based upon implementation.- Parameters:
navigatable
- NavigatableexternalLoc
- external locationcheckNavigationOption
- if true the service navigation option will be used to determine if navigation to the external program will be attempted, or if navigation to the external linkage location within the current program will be attempted. If false, the implementations default behavior will be performed.- Returns:
- true if either navigation to the external program or to a linkage location was completed successfully.
-
goToQuery
boolean goToQuery(Address fromAddr, QueryData queryData, GoToServiceListener listener, TaskMonitor monitor)
Parses the input string as either: an address/symbol expression (0x1000+5, or LAB1000+5) a symbol wildcard expression (LAB*, LAB?100) a symbol lookup an address lookup If the query results in more than one location, a list of locations will be displayed. If the query results in only one location, then a goto event will be fired(except for a wildcard query in which case a list will still be displayed. The listener will be notified after query and will indicate the query status.- Parameters:
fromAddr
- The address used to determine the scope of the queryqueryData
- the query input datalistener
- the listener that will be notified when the query completes.monitor
- the task monitor- Returns:
- true if the queryInput is found or appears to be a wildcard search.
-
goToQuery
boolean goToQuery(Navigatable navigatable, Address fromAddr, QueryData queryData, GoToServiceListener listener, TaskMonitor monitor)
-
getOverrideService
GoToOverrideService getOverrideService()
-
setOverrideService
void setOverrideService(GoToOverrideService override)
-
getDefaultNavigatable
Navigatable getDefaultNavigatable()
-
-