Module: Ronin::Support::Binary::CTypes::Arch::PPC

Includes:
BigEndian
Defined in:
lib/ronin/support/binary/ctypes/arch/ppc.rb

Overview

Represents the C types for the PPC architecture.

Constant Summary collapse

ADDRESS_SIZE =

The size of a pointer in bytes on PPC.

4
LONG =

The long type.

BigEndian::INT32
ULONG =

The unsigned long type.

BigEndian::UINT32
MACHINE_WORD =

The "machine word" type.

BigEndian::UINT32
POINTER =

The void * type.

MACHINE_WORD
TYPES =

The PPC types.

BigEndian::TYPES.merge(
  long:  self::LONG,
  ulong: self::ULONG,

  machine_word: self::MACHINE_WORD,
  pointer:      self::POINTER
)

Constants included from BigEndian

BigEndian::BYTE, BigEndian::DOUBLE, BigEndian::DWORD, BigEndian::FLOAT, BigEndian::FLOAT32, BigEndian::FLOAT64, BigEndian::INT, BigEndian::INT16, BigEndian::INT32, BigEndian::INT64, BigEndian::INT8, BigEndian::LONG_LONG, BigEndian::QWORD, BigEndian::SHORT, BigEndian::UINT, BigEndian::UINT16, BigEndian::UINT32, BigEndian::UINT64, BigEndian::UINT8, BigEndian::ULONG_LONG, BigEndian::USHORT, BigEndian::WORD

Constants included from CharTypes

CharTypes::CHAR, CharTypes::STRING, CharTypes::UCHAR

Class Method Summary collapse

Class Method Details

.[](name) ⇒ Type

Fetches the type from TYPES.

Parameters:

  • name (Symbol)

    The type name to lookup.

Returns:

Raises:

  • (ArgumentError)

    The type name was unknown.



68
69
70
71
72
# File 'lib/ronin/support/binary/ctypes/arch/ppc.rb', line 68

def self.[](name)
  TYPES.fetch(name) do
    raise(ArgumentError,"unknown PPC type: #{name.inspect}")
  end
end