class Cradare2::Lines::LineHelper

Overview

High-level DSL helper providing convenient access to source-line-to-assembly matching. Accessible via client.crystal.lines or block forms.

Defined in:

cradare2/lines/line_helper.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Client) #

[View source]

Instance Method Detail

def at(address : UInt64) : SourceLocation | Nil #

Resolves and returns the source location for an instruction address.


[View source]
def client : Client #

[View source]
def for_line(file : String, line : Int32) : Array(InstructionMapping) #

Returns all instructions that were compiled from the given source file and line.


[View source]
def groups(target : String | UInt64) : Array(LineInstructionGroup) #

Returns line instruction groups for a given function name or address.


[View source]
def interleaved(target : String | UInt64) : String #

Returns a formatted interleaved view showing source code lines alongside their generated assembly instructions.


[View source]
def map : SourceMap #

Returns the source map instance, lazily resolving lines from the binary if not yet loaded.


[View source]
def reader : SourceReader #

Returns the source reader instance.


[View source]
def reload : SourceMap #

Clears cached mappings and re-resolves from the target.


[View source]
def resolve_all : SourceMap #

Resolves line information for all analyzed functions in the binary.


[View source]
def resolve_function(target : String | UInt64) : SourceMap #

Resolves line information for a specific function by name or address.


[View source]
def resolver : LineResolver #

Returns the line resolver instance.


[View source]
def sync_to_r2(annotate_comments : Bool = true) : Int32 #

Synchronizes all discovered source line mappings into radare2 (CL and CC).


[View source]