Class: Ragweed::Wraposx::ThreadContext::X86StateHdr

Inherits:
FFI::Struct
  • Object
show all
Includes:
FFIStructInclude
Defined in:
lib/ragweed/wraposx/thread_context.rb

Overview

struct x86_state_hdr

int     flavor;
int     count;

;

Instance Method Summary collapse

Methods included from FFIStructInclude

#method_missing, #methods, #respond_to?

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ragweed::FFIStructInclude

Instance Method Details

#is_32?Boolean

Returns:

  • (Boolean)


64
65
66
# File 'lib/ragweed/wraposx/thread_context.rb', line 64

def is_32?
  !is_64?
end

#is_64?Boolean

Returns:

  • (Boolean)


53
54
55
56
57
58
59
60
61
62
# File 'lib/ragweed/wraposx/thread_context.rb', line 53

def is_64?
  case self[:flavor]
  when 1, 2, 3, 10
    false
  when 4, 5, 6, 11
    true
  else
    nil
  end
end