class RubyMemcheck::Frame
Attributes
configuration[R]
file[R]
fn[R]
line[R]
obj[R]
Public Class Methods
new(configuration, frame_xml)
click to toggle source
# File lib/ruby_memcheck/frame.rb, line 7 def initialize(configuration, frame_xml) @configuration = configuration @fn = frame_xml.at_xpath("fn")&.content @obj = frame_xml.at_xpath("obj")&.content # file and line may not be available @file = frame_xml.at_xpath("file")&.content @line = frame_xml.at_xpath("line")&.content end
Public Instance Methods
in_binary?()
click to toggle source
# File lib/ruby_memcheck/frame.rb, line 22 def in_binary? if obj File.basename(obj, ".*") == configuration.binary_name else false end end
in_ruby?()
click to toggle source
# File lib/ruby_memcheck/frame.rb, line 16 def in_ruby? obj == configuration.ruby || # Hack to fix Ruby built with --enabled-shared File.basename(obj) == "libruby.so.#{RUBY_VERSION}" end
to_s()
click to toggle source
# File lib/ruby_memcheck/frame.rb, line 30 def to_s if file "#{fn} (#{file}:#{line})" elsif fn "#{fn} (at #{obj})" else "<unknown stack frame>" end end