class Cradare2::DSL::Comments

Overview

Fluent DSL for setting, inspecting, and managing radare2 code comments safely.

Defined in:

cradare2/dsl/comments.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Client) #

[View source]

Instance Method Detail

def all : Hash(UInt64, String) #

Returns all comments registered in the session as a mapping of Address => Comment text (Cj).


[View source]
def batch_set(comments : Hash(Address, String)) : self #

Batches setting multiple comments in a single pipe transaction.


[View source]
def clear(address : Address) : self #

Removes the comment at the specified address (CC- @ <addr>).


[View source]
def clear_all : self #

Removes all comments throughout the binary session (CC-*).


[View source]
def get(address : Address) : String | Nil #

Retrieves the comment at the specified address, or nil if no comment is set (CC. @ <addr>).


[View source]
def list : Array(Tuple(UInt64, String)) #

Returns all comments as an array of (address, comment) tuples.


[View source]
def set(address : Address, text : String) : self #

Sets a comment at the specified address using Base64 encoding (CCu <base64> @ <addr>). Completely prevents string escaping and shell injection issues with quotes or newlines.


[View source]