module Cradare2::AddressUtils

Overview

Utility methods for formatting and parsing addresses.

Defined in:

cradare2/address.cr

Class Method Summary

Class Method Detail

def self.to_hex(addr : Address) : String #

Formats an address into a canonical hex string ("0x140001000") or symbol name.


[View source]
def self.to_u64(addr : Address) : UInt64 #

Parses an address into an unsigned 64-bit integer, defaulting to 0_u64 if parsing fails.


[View source]
def self.to_u64!(addr : Address) : UInt64 #

Parses an address into an unsigned 64-bit integer, raising ArgumentError if parsing fails.


[View source]
def self.to_u64?(addr : Address) : UInt64 | Nil #

Parses an address into an unsigned 64-bit integer, or returns nil if it is an unresolved symbol name.


[View source]