Package ghidra.app.util.opinion
Class LoadSpec
java.lang.Object
ghidra.app.util.opinion.LoadSpec
Represents a possible way for a
Loader to load something.-
Constructor Summary
ConstructorsConstructorDescriptionConstructs aLoadSpecwith an unknown language/compiler.LoadSpec(Loader loader, long imageBase, QueryResult languageCompilerSpecQueryResult) Constructs aLoadSpecfrom aQueryResult.LoadSpec(Loader loader, long imageBase, LanguageCompilerSpecPair languageCompilerSpec, boolean isPreferred) Constructs aLoadSpecfrom a manually suppliedLanguageCompilerSpecPair. -
Method Summary
Modifier and TypeMethodDescriptionlongGets the desired image base to use during the load.Gets thisLoadSpec'sLanguageCompilerSpecPair.booleanGets whether or not thisLoadSpecis complete.booleanbooleanGets whether or not thisLoadSpecrequires a language/compiler to load something.toString()
-
Constructor Details
-
LoadSpec
public LoadSpec(Loader loader, long imageBase, LanguageCompilerSpecPair languageCompilerSpec, boolean isPreferred) Constructs aLoadSpecfrom a manually suppliedLanguageCompilerSpecPair.- Parameters:
loader- ThisLoadSpec'sLoader.imageBase- The desired image base address for the load.languageCompilerSpec- The language/compiler spec ID. If this is not needed or not known, useLoadSpec(Loader, long, boolean).isPreferred- true if thisLoadSpecis preferred; otherwise, false.
-
LoadSpec
Constructs aLoadSpecfrom aQueryResult. -
LoadSpec
Constructs aLoadSpecwith an unknown language/compiler. SomeLoader's do not require a language/compiler.- Parameters:
loader- ThisLoadSpec'sLoader.imageBase- The desired image base address for the load.requiresLanguageCompilerSpec- True if thisLoadSpecrequires a language/compiler; otherwise, false. If a language/compiler is required, it will have to be supplied to theLoaderby some other means, and thisLoadSpecwill be considered incomplete.- See Also:
-
-
Method Details
-
getLoader
-
getDesiredImageBase
public long getDesiredImageBase()Gets the desired image base to use during the load.- Returns:
- The desired image base to use during the load.
-
getLanguageCompilerSpec
Gets thisLoadSpec'sLanguageCompilerSpecPair.- Returns:
- This
LoadSpec'sLanguageCompilerSpecPair. Could be null if thisLoadSpecdoesn't need or know the language/compiler.
-
isPreferred
public boolean isPreferred() -
requiresLanguageCompilerSpec
public boolean requiresLanguageCompilerSpec()Gets whether or not thisLoadSpecrequires a language/compiler to load something.- Returns:
- True if this
LoadSpecrequires a language/compiler to load something; otherwise, false.
-
isComplete
public boolean isComplete()Gets whether or not thisLoadSpecis complete. ALoadSpecis not considered complete if it requires a language/compiler to load something, but the language/compiler is currently unknown.- Returns:
- True if this
LoadSpecis complete; otherwise, false.
-
toString
-