class Cradare2::DSL::Flags

Overview

Fluent DSL for managing radare2 flags (symbols, labels, markers).

Defined in:

cradare2/dsl/flags.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(client : Client) #

[View source]

Instance Method Detail

def all : Array(Model::Flag) #

Returns all defined flags in the session (fj).


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

Batches the creation of multiple flags in a single command pipeline (f name @ addr; ...).


[View source]
def clear_all : self #

Clears all flags in the session (f-*).


[View source]
def clear_space : self #

Clears active flag space selection to default (fs *).


[View source]
def current_space : String #

Returns the name of the currently active flag space (fs.).


[View source]
def delete(name : String) : self #

Deletes a flag by name (f- <name>).


[View source]
def get(name : String) : UInt64 | Nil #

Retrieves the virtual address for a named flag, or nil if not found (f? <name> / fj).


[View source]
def in_space(name : String, &block : Flags -> U) : U forall U #

Executes the block within the designated flag space, safely restoring the previous space.


[View source]
def matching(pattern : String | Regex) : Array(Model::Flag) #

Filters flags matching a string query or regular expression.


[View source]
def rename(old_name : String, new_name : String) : self #

Renames an existing flag (fr <old> <new>).


[View source]
def set(name : String, address : Address, size : UInt64 = 0_u64) : self #

Sets a flag at the given address with an optional size in bytes (f <name> <size> @ <address>).


[View source]
def space(name : String) : self #

Selects or creates a flag space (fs <name>).


[View source]
def space(name : String, &block : Flags -> U) : U forall U #

Selects a flag space for the duration of the block, restoring the previous space afterwards.


[View source]
def spaces : Array(String) #

Returns all defined flag spaces in the session (fs).


[View source]