fn StackMachine(comptime options: ExpressionOptions) type

A stack machine that can decode and run DWARF expressions. Expressions can be decoded for non-native address size and endianness, but can only be executed if the current target matches the configuration.

Parameters

Fields

stack: field_call = .{ },

Functions

fn deinit(self: *Self, allocator: std.mem.Allocator) void

No documentation provided.

fn readOperand(stream: *field_call, opcode: u8, context: ExpressionContext) !?Operand

No documentation provided.

fn reset(self: *Self) void

No documentation provided.

fn run(self: *Self, expression: []const u8, allocator: std.mem.Allocator, context: ExpressionContext, initial_value: ?usize) ExpressionError!?Value

No documentation provided.

fn step(self: *Self, stream: *field_call, allocator: std.mem.Allocator, context: ExpressionContext) ExpressionError!bool

Reads an opcode and its operands from stream, then executes it