Crate vtil_parser[−][src]
Expand description
VTIL-RustParser
Read/write VTIL files in Rust.
You can learn more about VTIL here on the main GitHub page.
Examples
For a simple example of loading a VTIL routine and reading out some basic data:
use vtil_parser::{Routine, ArchitectureIdentifier}; let routine = Routine::from_path("resources/big.vtil")?; assert_eq!(routine.header.arch_id, ArchitectureIdentifier::Amd64);
For a more complex example, iterating over IL instructions:
use vtil_parser::{Routine, Op, Operand, RegisterDesc, ImmediateDesc, RegisterFlags}; let routine = Routine::from_path("resources/big.vtil")?; for (_, basic_block) in routine.explored_blocks.iter().take(1) { for instr in basic_block.instructions.iter().take(1) { match &instr.op { Op::Ldd(_, Operand::RegisterDesc(op2), Operand::ImmediateDesc(op3)) => { assert!(op2.flags.contains(RegisterFlags::PHYSICAL)); assert!(op3.i64() == 0); } _ => assert!(false) } assert_eq!(instr.vip.0, 0x9b833); } }
Modules
dump | Helpers for dumping VTIL structures |
Structs
BasicBlock | Basic block containing a linear sequence of VTIL instructions |
Header | Header containing metadata regarding the VTIL container |
ImmediateDesc | Describes a VTIL immediate value in an operand |
Instruction | VTIL instruction and associated metadata |
InstructionBuilder | Builder for VTIL instructions in an associated |
RegisterDesc | Describes a VTIL register in an operand |
RegisterFlags | Flags describing register properties |
Routine | VTIL routine container |
RoutineConvention | Routine calling convention information and associated metadata |
Vip | VTIL instruction pointer |
Enums
ArchitectureIdentifier | Architecture for IL inside of VTIL routines |
Error | Custom |
Op | VTIL operator and operands |
Operand | VTIL instruction operand |
Type Definitions
SubroutineConvention | Alias for |