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
ConstructorDescriptionConstructs aLoadSpec
with an unknown language/compiler.LoadSpec
(Loader loader, long imageBase, QueryResult languageCompilerSpecQueryResult) Constructs aLoadSpec
from aQueryResult
.LoadSpec
(Loader loader, long imageBase, LanguageCompilerSpecPair languageCompilerSpec, boolean isPreferred) Constructs aLoadSpec
from a manually suppliedLanguageCompilerSpecPair
. -
Method Summary
Modifier and TypeMethodDescriptionlong
Gets the desired image base to use during the load.Gets thisLoadSpec
'sLanguageCompilerSpecPair
.boolean
Gets whether or not thisLoadSpec
is complete.boolean
boolean
Gets whether or not thisLoadSpec
requires a language/compiler to load something.
-
Constructor Details
-
LoadSpec
public LoadSpec(Loader loader, long imageBase, LanguageCompilerSpecPair languageCompilerSpec, boolean isPreferred) Constructs aLoadSpec
from 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 thisLoadSpec
is preferred; otherwise, false.
-
LoadSpec
Constructs aLoadSpec
from aQueryResult
. -
LoadSpec
Constructs aLoadSpec
with 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 thisLoadSpec
requires a language/compiler; otherwise, false. If a language/compiler is required, it will have to be supplied to theLoader
by some other means, and thisLoadSpec
will 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 thisLoadSpec
doesn't need or know the language/compiler.
-
isPreferred
public boolean isPreferred() -
requiresLanguageCompilerSpec
public boolean requiresLanguageCompilerSpec()Gets whether or not thisLoadSpec
requires a language/compiler to load something.- Returns:
- True if this
LoadSpec
requires a language/compiler to load something; otherwise, false.
-
isComplete
public boolean isComplete()Gets whether or not thisLoadSpec
is complete. ALoadSpec
is not considered complete if it requires a language/compiler to load something, but the language/compiler is currently unknown.- Returns:
- True if this
LoadSpec
is complete; otherwise, false.
-