Class: Ragweed::Wraposx::ThreadContext::Exception32
- Includes:
- FFIStructInclude
- Defined in:
- lib/ragweed/wraposx/thread_context.rb
Overview
_STRUCT_X86_EXCEPTION_STATE32
unsigned int trapno;
unsigned int err;
unsigned int faultvaddr;
;
Constant Summary collapse
- FLAVOR =
3
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
#dump(&block) ⇒ Object
555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/ragweed/wraposx/thread_context.rb', line 555 def dump(&block) maybe_hex = lambda {|a| begin; "\n" + (" " * 9) + block.call(a, 16).hexdump(true)[10..-2]; rescue; ""; end } maybe_dis = lambda {|a| begin; "\n" + block.call(a, 16).distorm.map {|i| " " + i.mnem}.join("\n"); rescue; ""; end } string =<<EOM ----------------------------------------------------------------------- CONTEXT: trapno: #{self.trapno.to_s(16).rjust(8, "0")} #{maybe_hex.call(self.trapno)} err: #{self.err.to_s(16).rjust(8, "0")} #{maybe_hex.call(self.err)} faultvaddr: #{self.faultvaddr.to_s(16).rjust(8, "0")} #{maybe_hex.call(self.faultvaddr)} EOM end |