Class: ElfUtils::Section::DebugAddr

Inherits:
Base
  • Object
show all
Defined in:
lib/elf_utils/section/debug_addr.rb

Instance Attribute Summary

Attributes inherited from Base

#header

Instance Method Summary collapse

Methods inherited from Base

#addr, #alloc?, #bytes, #flags, #initialize, #inspect, #load_segment, #name, #offset, #relocate, #relocation_offset, #size, #symbol, #symbols, #to_range

Constructor Details

This class inherits a constructor from ElfUtils::Section::Base

Instance Method Details

#get(base:, index:) ⇒ Object



3
4
5
6
7
# File 'lib/elf_utils/section/debug_addr.rb', line 3

def get(base:, index:)
  @addr_type ||= @file.elf_type(:Addr)
  offset = base + index * @addr_type.size
  @addr_type.unpack(bytes[offset..])
end