class MachO::LoadCommands::BuildVersionCommand::ToolEntries

A representation of the tool versions exposed by a {BuildVersionCommand} (‘LC_BUILD_VERSION`).

Attributes

tools[R]

@return [Array<Tool>] all tools

Public Class Methods

new(view, ntools) click to toggle source

@param view [MachO::MachOView] the view into the current Mach-O @param ntools [Integer] the number of tools @api private

# File lib/macho/load_commands.rb, line 1215
def initialize(view, ntools)
  format = Utils.specialize_format("L=#{ntools * 2}", view.endianness)
  raw_table = view.raw_data[view.offset + 24, ntools * 8]
  blobs = raw_table.unpack(format).each_slice(2).to_a

  @tools = blobs.map { |b| Tool.new(*b) }
end