module
Cradare2::Util::Demangler
Overview
Demangler for Crystal, C++, and Rust symbol names, with full support for LLVM/MSVC PDB hex-escaped symbols, operator overloads, and generic types.
Defined in:
cradare2/util/demangler.crConstant Summary
-
MAX_CACHE_ENTRIES =
50000
Class Method Summary
-
.cache_size : Int32
Returns the number of cached demangled symbols.
-
.clean_crystal_symbol(symbol : String) : String
Cleans Crystal mangled names for human-readable display
-
.clear_cache : Nil
Clears the demangling cache.
-
.decode_pdb_escapes(symbol : String) : String
Decodes LLVM/MSVC PDB hex escapes such as: _2A.
-
.demangle(symbol : String, client : Transport::Base | Nil = nil) : String
Demangles a symbol name.
-
.is_crystal_symbol?(symbol : String) : Bool
Checks if symbol matches common Crystal mangled symbol conventions
-
.is_mangled_native?(symbol : String) : Bool
Checks if symbol looks like Itanium (_Z...) or MSVC (?...) mangled C++
-
.parse_crystal_method(symbol : String) : Tuple(String, String, Bool) | Nil
Parses a cleaned or mangled Crystal symbol into {class_name, method_name, is_instance_method} Returns nil if the symbol cannot be decomposed into a Crystal class and method.
-
.strip_r2_prefixes(symbol : String) : String
Strips common radare2 symbol prefixes (sym.imp., sym., pdb., sym.pdb.)
Class Method Detail
Cleans Crystal mangled names for human-readable display
Decodes LLVM/MSVC PDB hex escapes such as: _2A. -> *, .3A. -> :, .23. -> #, .28. -> (, .29. -> ), .3C. -> <, .3E. -> >, .20. -> ' ', etc.
Demangles a symbol name. If an optional radare2 command runner is given,
it can query radare2's built-in demangler (?m) for C++/Rust/MSVC symbols.
Checks if symbol matches common Crystal mangled symbol conventions
Checks if symbol looks like Itanium (_Z...) or MSVC (?...) mangled C++
Parses a cleaned or mangled Crystal symbol into {class_name, method_name, is_instance_method} Returns nil if the symbol cannot be decomposed into a Crystal class and method.
Strips common radare2 symbol prefixes (sym.imp., sym., pdb., sym.pdb.)