Class: Idb::OtoolWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/lib/otool_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(binary) ⇒ OtoolWrapper

Returns a new instance of OtoolWrapper.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/lib/otool_wrapper.rb', line 7

def initialize binary
  @otool_path = "/usr/bin/otool"
  unless File.exist? @otool_path.to_s
    $log.error "otool not available. Some functions will not work properly."
    error = Qt::MessageBox.new
    error.setInformativeText("This feature requires  otool to be installed on the host running idb. This is the default on OS X but it may not be available for other platforms.")
    error.setIcon(Qt::MessageBox::Critical)
    error.exec
    @otool_path = nil

    return
  end

  @binary = binary
  parse_load_commands
  parse_shared_libraries
  parse_header
  process_symbol_table
end

Instance Attribute Details

#arcObject

Returns the value of attribute arc.



5
6
7
# File 'lib/lib/otool_wrapper.rb', line 5

def arc
  @arc
end

#canariesObject

Returns the value of attribute canaries.



5
6
7
# File 'lib/lib/otool_wrapper.rb', line 5

def canaries
  @canaries
end

#load_commandsObject

Returns the value of attribute load_commands.



5
6
7
# File 'lib/lib/otool_wrapper.rb', line 5

def load_commands
  @load_commands
end

#pieObject

Returns the value of attribute pie.



5
6
7
# File 'lib/lib/otool_wrapper.rb', line 5

def pie
  @pie
end

#shared_librariesObject

Returns the value of attribute shared_libraries.



5
6
7
# File 'lib/lib/otool_wrapper.rb', line 5

def shared_libraries
  @shared_libraries
end