class
Cradare2::CrystalHelper
- Cradare2::CrystalHelper
- Reference
- Object
Overview
Crystal-specific binary analysis, memory layout inspection, and debugging tools.
Defined in:
cradare2/crystal.crConstructors
Instance Method Summary
-
#classes : Array(String)
Discovers all distinct Crystal class, struct, and module names present in the binary.
- #client : Client
-
#crash_report : String
Generates a detailed crash report with demangled Crystal stack traces, registers, and binary context.
-
#crystal_binary? : Bool
Returns true if the binary appears to be compiled with Crystal.
-
#crystal_main_function : Model::Function | Nil
Returns the
__crystal_mainfunction model if analyzed. -
#decompile_method(class_name : String, method_name : String, side_by_side : Bool = false) : String
Decompiles a specific method belonging to a Crystal class or struct.
-
#demangle_all(apply_to_r2 : Bool = false) : Hash(UInt64, String)
Discovers all mangled Crystal symbols and functions, demangles them, and optionally applies the demangled names directly into the radare2 session via
afn(analyze function name) andfr(flag rename). -
#demangle_symbol(symbol : String) : String
Demangles a single symbol using the multi-language demangler.
-
#demangled_backtrace : Array(Model::StackFrame)
Returns the current call stack with demangled Crystal function and class names.
-
#entrypoint : UInt64 | Nil
Returns the address of
__crystal_mainor entry function if found. -
#gc_functions : Array(Model::Function)
Returns all Boehm GC related functions found in the binary.
-
#gc_symbols : Array(Model::Symbol)
Returns all Boehm GC related symbols found in the binary.
-
#lines : Lines::LineHelper
Accessor for source-line-to-assembly instruction matching tools.
-
#lines(&block : Lines::LineHelper -> U) : U forall U
Block form for
#linesDSL. -
#methods_for_class(class_name : String) : Array(Model::Function)
Finds all analyzed functions belonging to a given Crystal class name.
-
#parse_symbol(symbol : String) : CrystalSymbolInfo
Parses a Crystal symbol into its constituent class and method parts.
-
#read_array_header(address : Address) : CrystalArrayHeader
Inspects and reads a Crystal
Array(T)header from memory ataddress. -
#read_fiber(address : Address) : CrystalFiber
Inspects and reads a Crystal
Fiberstruct from memory ataddress. -
#read_hash_header(address : Address) : CrystalHashHeader
Inspects and reads a Crystal
Hash(K, V)header from memory ataddress. -
#read_slice_header(address : Address) : CrystalSliceHeader
Inspects and reads a Crystal
Slice(T)struct header from memory ataddress. -
#read_string(address : Address, max_bytes : Int32 = 1048576) : CrystalString
Inspects and reads a Crystal
Stringfrom memory ataddress. -
#read_string_value(address : Address, max_bytes : Int32 = 1048576) : String
Convenience method to read just the UTF-8 String value of a Crystal
Stringataddress. -
#read_type_id(address : Address) : Int32
Reads the 4-byte
type_idof a Crystal reference object ataddress. -
#symbols_for_class(class_name : String) : Array(Model::Symbol)
Finds all symbols belonging to a given Crystal class name.
Constructor Detail
Instance Method Detail
Discovers all distinct Crystal class, struct, and module names present in the binary.
Generates a detailed crash report with demangled Crystal stack traces, registers, and binary context.
Returns true if the binary appears to be compiled with Crystal.
Checks for the presence of __crystal_main, *Crystal::*, Boehm GC symbols, or Crystal mangling.
Returns the __crystal_main function model if analyzed.
Decompiles a specific method belonging to a Crystal class or struct.
Discovers all mangled Crystal symbols and functions, demangles them,
and optionally applies the demangled names directly into the radare2 session
via afn (analyze function name) and fr (flag rename).
Demangles a single symbol using the multi-language demangler.
Returns the current call stack with demangled Crystal function and class names.
Returns all Boehm GC related functions found in the binary.
Finds all analyzed functions belonging to a given Crystal class name.
Parses a Crystal symbol into its constituent class and method parts.
Inspects and reads a Crystal Array(T) header from memory at address.
Inspects and reads a Crystal Fiber struct from memory at address.
Inspects and reads a Crystal Hash(K, V) header from memory at address.
Inspects and reads a Crystal Slice(T) struct header from memory at address.
Inspects and reads a Crystal String from memory at address.
Convenience method to read just the UTF-8 String value of a Crystal String at address.
Reads the 4-byte type_id of a Crystal reference object at address.
Finds all symbols belonging to a given Crystal class name.