class Lapis::Debugger::Decompiler

Defined in:

libgodot/debugger/decompiler.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Cradare2::Client) #

Instance Method Detail

def client : Cradare2::Client #

def crystal_classes : Array(String) #

Returns all discovered Crystal class/struct/module names from debug symbols


def decode_variant_at(address : UInt64) : DecodedVariant #

Decodes a Godot Variant payload at virtual memory address


def decompile_at(address : UInt64) : String #

Decompiles function at address into clean pseudo-C (pdc)


def decompile_function(name : String) : String #

Decompiles by function name or symbol


def decompile_godot_object(address : UInt64) : GodotObjectHeader #

Decodes a Godot Object header at virtual memory address


def decompile_method(class_name : String, method_name : String) : String #

Looks up a method for a given Crystal class and decompiles it


def decompile_side_by_side(address : UInt64) : String #

Decompiles function with side-by-side assembly instruction comparison (pdca)


def decompile_source_line(address : UInt64) : String #

DWARF line-annotated decompile if line metadata is present (CLd)


def disassemble_function(target : UInt64 | Int32 | Int64 | String) : String #

Full function disassembly formatted with addresses and opcodes (pdf)


def disassemble_range(address : UInt64, count : Int32 = 15) : Array(Cradare2::Model::Instruction) #

Disassembles a range of instructions starting at address


def godot_plugin : R2GodotPlugin #

def source_context_at(address : UInt64, window : Int32 = 4) : Array(NamedTuple(line: Int32, text: String, current: Bool)) #

Returns source context lines around address if available


def source_disassembly_at(address : UInt64, count : Int32 = 20) : String #

Returns source-interleaved disassembly (pdls)


def source_location_at(address : UInt64) : String | Nil #

Returns source file and line mapping for address using radare2 debug symbols (cl)


def source_location_model(address : UInt64) : Cradare2::Lines::SourceLocation | Nil #

Returns source location struct for address using Cradare2 Lines helper