class Satyr::Stacktrace
Program stack trace, possibly composed of multiple threads
Private Class Methods
new(pointer)
click to toggle source
Private constructor - Stacktrace
objects are created in Report#stacktrace
# File lib/satyr.rb, line 139 def initialize(pointer) raise SatyrError, "Invalid structure" if pointer.null? @struct = Satyr::FFI::StacktraceStruct.new pointer end
Public Instance Methods
find_crash_thread()
click to toggle source
Returns Thread
that likely caused the crash that produced this stack trace
# File lib/satyr.rb, line 147 def find_crash_thread pointer = Satyr::FFI.sr_stacktrace_find_crash_thread @struct.to_ptr raise SatyrError, "Could not find crash thread" if pointer.null? dup = Satyr::FFI.sr_thread_dup(pointer) raise SatyrError, "Failed to duplicate thread" if dup.null? Thread.send(:new, dup) end