Class: LLDB::Symbol
- Inherits:
-
Object
- Object
- LLDB::Symbol
- Includes:
- NativeLifecycle
- Defined in:
- lib/lldb/symbol.rb
Instance Method Summary collapse
- #base_name ⇒ Object
- #display_name ⇒ Object
- #end_address ⇒ Object
- #id ⇒ Object
-
#initialize(ptr, target: nil, context: nil) ⇒ Symbol
constructor
A new instance of Symbol.
- #mangled_name ⇒ Object
- #name ⇒ Object
- #prologue_byte_size ⇒ Object
- #size ⇒ Object
- #start_address ⇒ Object
- #to_ptr ⇒ Object
- #type ⇒ Object
- #valid? ⇒ Boolean
- #value ⇒ Object
Methods included from NativeLifecycle
#close, #closed?, #context, #context!, #ensure_open!, #initialize_native_object
Constructor Details
#initialize(ptr, target: nil, context: nil) ⇒ Symbol
Returns a new instance of Symbol.
12 13 14 15 16 17 18 19 |
# File 'lib/lldb/symbol.rb', line 12 def initialize(ptr, target: nil, context: nil) @target = target initialize_native_object( ptr, release: ->(released) { FFIBindings.lldb_symbol_destroy(released) }, context: context || target&.context ) end |
Instance Method Details
#base_name ⇒ Object
48 49 50 51 52 |
# File 'lib/lldb/symbol.rb', line 48 def base_name return nil unless valid? FFIBindings.lldb_symbol_get_base_name(@ptr) end |
#display_name ⇒ Object
34 35 36 37 38 |
# File 'lib/lldb/symbol.rb', line 34 def display_name return nil unless valid? FFIBindings.lldb_symbol_get_display_name(@ptr) end |
#end_address ⇒ Object
60 61 62 |
# File 'lib/lldb/symbol.rb', line 60 def end_address address_at(:lldb_symbol_get_end_address) end |
#id ⇒ Object
93 94 95 96 97 |
# File 'lib/lldb/symbol.rb', line 93 def id return 0 unless valid? FFIBindings.lldb_symbol_get_id(@ptr) end |
#mangled_name ⇒ Object
41 42 43 44 45 |
# File 'lib/lldb/symbol.rb', line 41 def mangled_name return nil unless valid? FFIBindings.lldb_symbol_get_mangled_name(@ptr) end |
#name ⇒ Object
27 28 29 30 31 |
# File 'lib/lldb/symbol.rb', line 27 def name return nil unless valid? FFIBindings.lldb_symbol_get_name(@ptr) end |
#prologue_byte_size ⇒ Object
79 80 81 82 83 |
# File 'lib/lldb/symbol.rb', line 79 def prologue_byte_size return 0 unless valid? FFIBindings.lldb_symbol_get_prologue_byte_size(@ptr) end |
#size ⇒ Object
72 73 74 75 76 |
# File 'lib/lldb/symbol.rb', line 72 def size return 0 unless valid? FFIBindings.lldb_symbol_get_size(@ptr) end |
#start_address ⇒ Object
55 56 57 |
# File 'lib/lldb/symbol.rb', line 55 def start_address address_at(:lldb_symbol_get_start_address) end |
#to_ptr ⇒ Object
100 101 102 |
# File 'lib/lldb/symbol.rb', line 100 def to_ptr @ptr end |
#type ⇒ Object
86 87 88 89 90 |
# File 'lib/lldb/symbol.rb', line 86 def type return 0 unless valid? FFIBindings.lldb_symbol_get_type(@ptr) end |
#valid? ⇒ Boolean
22 23 24 |
# File 'lib/lldb/symbol.rb', line 22 def valid? !@ptr.null? && FFIBindings.lldb_symbol_is_valid(@ptr) != 0 end |
#value ⇒ Object
65 66 67 68 69 |
# File 'lib/lldb/symbol.rb', line 65 def value return INVALID_ADDRESS unless valid? FFIBindings.lldb_symbol_get_value(@ptr) end |