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
AssemblyInstruction
Disassembly
A disassembly of instructions originating from a VarnodeData.
GhidraSleigh
Sleigh instance that uses Ghidra libsla for its disassembly.
GhidraSleighBuilder
Builder for GhidraSleigh. The parameters S and P track whether the sleigh and processor specifications have been provided.
PcodeInstruction
A pcode instruction
VarnodeData
A VarnodeData represents the address and size of data.

Enums§

AddressSpaceType
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 some 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.

Traits§

LoadImage
Sleigh
Interface for the Sleigh API. See GhidraSleigh for the Ghidra implementation.

Type Aliases§

Result
Result returned by Sleigh APIs