Class: Ragweed::Wraposx::ThreadContext::Exception64
- Includes:
- FFIStructInclude
- Defined in:
- lib/ragweed/wraposx/thread_context.rb
Overview
_STRUCT_X86_EXCEPTION_STATE64
unsigned int trapno;
unsigned int err;
__uint64_t faultvaddr;
;
Constant Summary collapse
- FLAVOR =
6
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
582 583 584 585 586 587 588 589 590 591 592 593 |
# File 'lib/ragweed/wraposx/thread_context.rb', line 582 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 =" -----------------------------------------------------------------------\n CONTEXT:\n trapno: \#{self.trapno.to_s(16).rjust(8, \"0\")} \#{maybe_hex.call(self.trapno)}\n err: \#{self.err.to_s(16).rjust(8, \"0\")} \#{maybe_hex.call(self.err)}\n faultvaddr: \#{self.faultvaddr.to_s(16).rjust(16, \"0\")} \#{maybe_hex.call(self.faultvaddr)}\n" end |