Crate libsla

Crate libsla 

Source
Expand description

This crate includes Rust bindings to the Ghidra SLEIGH library libsla for translating native code to p-code.

SLEIGH is a processor specification language developed for the Ghidra used to describe microprocessors with enough detail to facilitate disassembly and decompilation. The processor-specific instructions are translated to p-code, which captures the instruction semantics independent of the specific processor. The details on how to perform this translation are captured by the compiled SLEIGH specification for the processor.

Structs§

Address
An address is represented by an offset into an address space
AddressSpace
Information about an address space
AddressSpaceId
Address space identifier for an address space. While this value is unique, it is NOT guaranteed to be deterministically constructed. This means different instances of Sleigh may identify the same address space with different identifiers.
AssemblyInstruction
A disassembled native assembly instruction
GhidraSleigh
Sleigh instance that uses Ghidra libsla for its disassembly.
GhidraSleighBuilder
Builder for GhidraSleigh. The parameter P tracks whether the processor specification has been provided.
NativeDisassembly
Disassembly of an instruction into its native assembly
PcodeDisassembly
Disassembly of an instruction into pcode
PcodeInstruction
A pcode instruction. Interpreting the pcode instruction can require additional context in some cases. For example, the OpCode::Load operation encodes the AddressSpace using the AddressSpaceId. This identifier in particular may differ across Sleigh instances.
VarnodeData
A VarnodeData represents the address and size of data.

Enums§

AddressSpaceType
Types for an AddressSpace.
AnalysisOp
Operations which are only generated by analysis programs. These operations are not permitted for use in processor specifications and therefore will never be emitted when directly translating machine instructions.
BoolOp
Operations for boolean, single-bit inputs.
Error
Errors returned by this crate. Note that APIs that may pass through FFI boundaries return String since those errors are ultimately serialized anyway.
FloatOp
Operations on floating-point numbers.
HasSpec
The sleigh or processor specification has been provided
IntOp
Operations on integers.
IntSign
Indicates whether an integer operation is operating on signed or unsigned inputs. If the operation does not include IntSign as an argument, then distinguishing between signed and unsigned is not applicable for the operation.
MissingSpec
The sleigh or processor specification has not yet been provided
OpCode
A representation of opcodes for p-code instructions.
PseudoOp
Operations which represent black-box placeholders for some sequence of changes to the machine state.
SlaDataEncoding
The encoding of the compiled sleigh specification (.slaspec).

Traits§

InstructionLoader
Interface for loading instruction bytes to be disassembled.
Sleigh
Interface for the Sleigh API. See GhidraSleigh for the Ghidra implementation.

Type Aliases§

Result
Result returned by Sleigh APIs