Class: Cymbol::Objdump
- Inherits:
-
Object
- Object
- Cymbol::Objdump
- Defined in:
- lib/ruby-cymbol/objdump.rb
Defined Under Namespace
Classes: DebugSymbol
Instance Attribute Summary collapse
-
#symbols ⇒ Object
Returns the value of attribute symbols.
Instance Method Summary collapse
-
#initialize(path) ⇒ Objdump
constructor
A new instance of Objdump.
Constructor Details
#initialize(path) ⇒ Objdump
Returns a new instance of Objdump.
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/ruby-cymbol/objdump.rb', line 42 def initialize(path) self.symbols = Array.new #build objdump command # eclipse crash with the \x60 character :S objdump_output = eval("\x60objdump -t #{path}\x60") # parse objdump output objdump_output.each_line do |line| words = line.split(" ") if words.size > 1 then self.symbols << DebugSymbol.new( words[-1], words[0].to_i(16) ) end end end |
Instance Attribute Details
#symbols ⇒ Object
Returns the value of attribute symbols.
25 26 27 |
# File 'lib/ruby-cymbol/objdump.rb', line 25 def symbols @symbols end |