Class: Ronin::DB::Arch
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Ronin::DB::Arch
- Includes:
- Model, Model::HasUniqueName
- Defined in:
- lib/ronin/db/arch.rb
Overview
Represents a Computer Architecture and predefines many other common architectures (Arch.x86, Arch.x86_64, Arch.ppc, Arch.ppc64, Arch.mips, Arch.mips_le, Arch.mips_be, Arch.arm, Arch.arm_le, and Arch.arm_be).
Instance Attribute Summary collapse
-
#endian ⇒ "little", "big"
Endianness of the architecture.
-
#id ⇒ Integer
The primary key of the arch.
-
#word_size ⇒ Integer
Address length of the architecture.
Attributes included from Model::HasUniqueName
Class Method Summary collapse
-
.arm ⇒ Arch
The ARM Architecture.
-
.arm_be ⇒ Arch
The ARM (big endian) Architecture.
-
.arm_le ⇒ Arch
The ARM (little endian) Architecture.
-
.i686 ⇒ Arch
The i686 Architecture.
-
.mips ⇒ Arch
The MIPS Architecture.
-
.mips_be ⇒ Arch
The MIPS (big endian) Architecture.
-
.mips_le ⇒ Arch
The MIPS (little endian) Architecture.
-
.ppc ⇒ Arch
The 32-bit PowerPC Architecture.
-
.ppc64 ⇒ Arch
The 64-bit PowerPC Architecture.
-
.x86 ⇒ Arch
The x86 Architecture.
-
.x86_64 ⇒ Arch
The x86_64 Architecture.
Methods included from Model::HasUniqueName
Methods included from Model
Instance Attribute Details
#endian ⇒ "little", "big"
Endianness of the architecture.
48 |
# File 'lib/ronin/db/arch.rb', line 48 enum :endian, {little: 'little', big: 'big'} |
#id ⇒ Integer
The primary key of the arch.
42 |
# File 'lib/ronin/db/arch.rb', line 42 attribute :id, :integer |
#word_size ⇒ Integer
Address length of the architecture.
55 |
# File 'lib/ronin/db/arch.rb', line 55 attribute :word_size, :integer |
Class Method Details
.arm ⇒ Arch
The ARM Architecture
136 137 138 |
# File 'lib/ronin/db/arch.rb', line 136 def self.arm find_or_create_by(name: 'ARM') end |
.arm_be ⇒ Arch
The ARM (big endian) Architecture
154 155 156 |
# File 'lib/ronin/db/arch.rb', line 154 def self.arm_be find_or_create_by(name: 'ARM (Big-Endian)') end |
.arm_le ⇒ Arch
The ARM (little endian) Architecture
145 146 147 |
# File 'lib/ronin/db/arch.rb', line 145 def self.arm_le find_or_create_by(name: 'ARM (Little-Endian)') end |
.i686 ⇒ Arch
The i686 Architecture
73 74 75 |
# File 'lib/ronin/db/arch.rb', line 73 def self.i686 find_or_create_by(name: 'i686') end |
.mips ⇒ Arch
The MIPS Architecture
109 110 111 |
# File 'lib/ronin/db/arch.rb', line 109 def self.mips find_or_create_by(name: 'MIPS') end |
.mips_be ⇒ Arch
The MIPS (big endian) Architecture
127 128 129 |
# File 'lib/ronin/db/arch.rb', line 127 def self.mips_be find_or_create_by(name: 'MIPS (Big-Endian)') end |
.mips_le ⇒ Arch
The MIPS (little endian) Architecture
118 119 120 |
# File 'lib/ronin/db/arch.rb', line 118 def self.mips_le find_or_create_by(name: 'MIPS (Little-Endian)') end |
.ppc ⇒ Arch
The 32-bit PowerPC Architecture
91 92 93 |
# File 'lib/ronin/db/arch.rb', line 91 def self.ppc find_or_create_by(name: 'PPC') end |
.ppc64 ⇒ Arch
The 64-bit PowerPC Architecture
100 101 102 |
# File 'lib/ronin/db/arch.rb', line 100 def self.ppc64 find_or_create_by(name: 'PPC64') end |
.x86 ⇒ Arch
The x86 Architecture
64 65 66 |
# File 'lib/ronin/db/arch.rb', line 64 def self.x86 find_or_create_by(name: 'x86') end |
.x86_64 ⇒ Arch
The x86_64 Architecture
82 83 84 |
# File 'lib/ronin/db/arch.rb', line 82 def self.x86_64 find_or_create_by(name: 'x86-64') end |