Class: Ragweed::Wraposx::Vm::RegionBasicInfo64
- Inherits:
-
RegionInfo
- Object
- FFI::Struct
- RegionInfo
- Ragweed::Wraposx::Vm::RegionBasicInfo64
- Defined in:
- lib/ragweed/wraposx/region_info.rb
Constant Summary collapse
- FLAVOR =
Ragweed::Wraposx::Vm::REGION_BASIC_INFO_64
Instance Attribute Summary
Attributes inherited from RegionInfo
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
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/ragweed/wraposx/region_info.rb', line 88 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 BASIC INFO:\n base address: \#{self.base_address.to_s(16).rjust(8, \"0\")}\n\n protection: \#{self.protection.to_s(2).rjust(8, \"0\")} \#{Ragweed::Wraposx::Vm::Pflags.flag_dump(self.protection)}\n max_protection: \#{self.max_protection.to_s(2).rjust(8, \"0\")} \#{Ragweed::Wraposx::Vm::Pflags.flag_dump(self.max_protection)}\n inheritance: \#{self.inheritance.to_s(16).rjust(8, \"0\")} \#{maybe_hex.call(self.inheritance)}\n shared: \#{self.shared.to_s(16).rjust(8, \"0\")} \#{maybe_hex.call(self.shared)}\n reserved: \#{self.reserved.to_s(16).rjust(8, \"0\")} \#{maybe_hex.call(self.reserved)}\n offset: \#{self.offset.to_s(16).rjust(16, \"0\")} \#{maybe_hex.call(self.offset)}\n behavior: \#{self.behavior.to_s(16).rjust(8, \"0\")} \#{maybe_hex.call(self.behavior)}\n user_wired_count: \#{self.user_wired_count.to_s(16).rjust(8, \"0\")} \#{maybe_hex.call(self.user_wired_count)}\n size: \#{self.size.to_s(16).rjust(8, \"0\")} \#{maybe_hex.call(self.size)}\n" end |