Class SleighLanguageProvider
java.lang.Object
ghidra.app.plugin.processors.sleigh.SleighLanguageProvider
- All Implemented Interfaces:
LanguageProvider, ExtensionPoint
Searches resources for spec files and provides LanguageDescriptions for these
specifications
-
Field Summary
Fields -
Method Summary
ChangeModifier and TypeMethodDescriptiongetLanguage(LanguageID languageId, TaskMonitor monitor) Returns the language with the given name or null if no language has that name.getLanguageDescription(LanguageID languageId) Returns thelanguage descriptionof the specified languageReturns a list of language descriptions provided by this providerstatic SleighLanguageProviderReturns a singleton instance of aSleighLanguageProvider.booleanbooleanisLanguageLoaded(LanguageID languageId) Returns true if the given language has been successfully loadedREMOVEDLanguagegetLanguage(LanguageID languageId) RemovedMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface LanguageProvider
getLanguage
-
Field Details
-
LANGUAGE_LOCK_TIMEOUT_PROPNAME NEW
Property that can be set as a jvm startup option to control the sla lock timeout duration.- See Also:
-
LANGUAGE_LOCK_TIMEOUT NEW
Timeout used when trying to acquire the sla file lock. (Default: 60 seconds)The sla lock is acquired and held during .sla file checking and writing (compiling). Currently parsing the sla xml is done after releasing the lock.
If a Ghidra process is trying to fetch a sleigh language, which requires acquiring the lock on a sla file, and it times out before succeeding, the caller will get a
LanguageNotFoundExceptionexception.This timeout should be long enough to allow the process that has the lock to finish compiling and writing the slaspec so that the waiting process does not give up too quickly and give an error to the user. See
LANGUAGE_LOCK_TIMEOUT_PROPNAME.
-
-
Method Details
-
getSleighLanguageProvider
Returns a singleton instance of aSleighLanguageProvider.- Returns:
- singleton
SleighLanguageProvider
-
hadLoadFailure
public boolean hadLoadFailure()- Specified by:
hadLoadFailurein interfaceLanguageProvider- Returns:
- true if one of more languages or language description failed to load properly.
-
isLanguageLoaded
Description copied from interface:LanguageProviderReturns true if the given language has been successfully loaded- Specified by:
isLanguageLoadedin interfaceLanguageProvider- Parameters:
languageId- the name of the language to be retrieved- Returns:
- true if the given language has been successfully loaded
-
getLanguage NEW
public SleighLanguage getLanguage(LanguageID languageId, TaskMonitor monitor) throws LanguageNotFoundException Description copied from interface:LanguageProviderReturns the language with the given name or null if no language has that name.- Specified by:
getLanguagein interfaceLanguageProvider- Parameters:
languageId- the name of the language to be retrievedmonitor-TaskMonitor- Returns:
- the
Languagewith the given name or null if not found - Throws:
LanguageNotFoundException- if language instantiation error
-
getLanguageDescription NEW
Returns thelanguage descriptionof the specified language- Parameters:
languageId-LanguageID- Returns:
SleighLanguageDescription
-
getLanguageDescriptions
Description copied from interface:LanguageProviderReturns a list of language descriptions provided by this provider- Specified by:
getLanguageDescriptionsin interfaceLanguageProvider
-