class Cradare2::Lines::LineResolver

Overview

Resolves source lines from binaries using a chain of pluggable LineProviders.

Defined in:

cradare2/lines/line_resolver.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Client, map : SourceMap = SourceMap.new, providers : Array(LineProvider) | Nil = nil) #

[View source]

Instance Method Detail

def client : Client #

[View source]
def find_llvm_symbolizer : String | Nil #

Locates the llvm-symbolizer binary on the host system.


[View source]
def map : SourceMap #

[View source]
def providers : Array(LineProvider) #

[View source]
def query_r2_codelines : Hash(UInt64, SourceLocation) #

Queries radare2's CLj command to extract all loaded code-line entries.


[View source]
def register_provider(provider : LineProvider) : self #

Registers an additional line provider into the resolution chain.


[View source]
def resolve_address(address : UInt64) : SourceLocation | Nil #

Resolves a single address through the provider chain.


[View source]
def resolve_all_functions : SourceMap #

Populates the source map for all analyzed functions in the binary.


[View source]
def resolve_from_r2_codelines : Array(SourceLocation) #

Convenience helper returning array of all resolved source locations from r2 codelines.


[View source]
def resolve_function(offset : UInt64, name : String | Nil = nil, size : UInt64 = 64_u64) : SourceMap #

Populates the source map for a function given its offset, name, and estimated size.


[View source]
def resolve_function(fn : Model::Function) : SourceMap #

Populates the source map for a single function model.


[View source]
def resolve_instructions(instructions : Array(Model::Instruction), function_name : String | Nil = nil) : SourceMap #

Resolves a list of instructions through the provider chain and adds them to the source map.


[View source]
def resolve_target_binary_path : String | Nil #

Returns the path of the opened binary by querying radare2 info.


[View source]