Class: ElfUtils::Section::DebugInfo::DebugStrRef
- Inherits:
-
Object
- Object
- ElfUtils::Section::DebugInfo::DebugStrRef
- Defined in:
- lib/elf_utils/section/debug_info/debug_str_ref.rb
Instance Method Summary collapse
- #deref ⇒ Object
-
#initialize(cu, offset) ⇒ DebugStrRef
constructor
A new instance of DebugStrRef.
- #inspect ⇒ Object
Constructor Details
#initialize(cu, offset) ⇒ DebugStrRef
Returns a new instance of DebugStrRef.
3 4 5 6 |
# File 'lib/elf_utils/section/debug_info/debug_str_ref.rb', line 3 def initialize(cu, offset) @cu = cu @offset = offset end |
Instance Method Details
#deref ⇒ Object
8 9 10 |
# File 'lib/elf_utils/section/debug_info/debug_str_ref.rb', line 8 def deref @str ||= @cu.file.section(".debug_str")[@offset] end |
#inspect ⇒ Object
12 13 14 15 |
# File 'lib/elf_utils/section/debug_info/debug_str_ref.rb', line 12 def inspect "<%p cu=0x%x, offset=0x%08x, str=%p>" % [self.class, @cu.offset, @offset, deref] end |