class Twib::Switch::Debug::Event::Event
Attributes
flags[R]
thread_id[R]
Public Class Methods
new(flags, thread_id, specific)
click to toggle source
# File lib/twib/switch/debug.rb, line 23 def initialize(flags, thread_id, specific) @flags = flags @thread_id = thread_id unpack_specific(specific) end
unpack(pack)
click to toggle source
# File lib/twib/switch/debug.rb, line 6 def self.unpack(pack) event_type, flags, thread_id, specific = pack.unpack("L<L<Q<a*") case event_type when AttachProcess::TYPE return AttachProcess.new(flags, thread_id, specific) when AttachThread::TYPE return AttachThread.new(flags, thread_id, specific) when ExitProcess::TYPE return ExitProcess.new(flags, thread_id, specific) when ExitThread::TYPE return ExitThread.new(flags, thread_id, specific) when Exception::TYPE return Exception.new(flags, thread_id, specific) else raise "unknown debug event type: #{event_type}" end end