Class: SeccompTools::Instruction::ST

Inherits:
LD
  • Object
show all
Defined in:
lib/seccomp-tools/instruction/st.rb

Overview

Instruction st.

Direct Known Subclasses

STX

Constant Summary

Constants included from Const::BPF

Const::BPF::ACTION, Const::BPF::COMMAND, Const::BPF::JMP, Const::BPF::MISCOP, Const::BPF::MODE, Const::BPF::OP, Const::BPF::PR_SET_SECCOMP, Const::BPF::SECCOMP_MODE_FILTER, Const::BPF::SECCOMP_RET_ACTION_FULL, Const::BPF::SECCOMP_RET_DATA, Const::BPF::SECCOMP_SET_MODE_FILTER, Const::BPF::SIZEOF_SECCOMP_DATA, Const::BPF::SRC

Instance Method Summary collapse

Methods inherited from LD

#reg

Methods inherited from Base

#initialize, #invalid

Constructor Details

This class inherits a constructor from SeccompTools::Instruction::Base

Instance Method Details

#branch(context) ⇒ Array<(Integer, Context)>



21
22
23
24
25
# File 'lib/seccomp-tools/instruction/st.rb', line 21

def branch(context)
  ctx = context.dup
  ctx.store(k, reg)
  [[line + 1, ctx]]
end

#decompileObject

Decompile instruction.



10
11
12
# File 'lib/seccomp-tools/instruction/st.rb', line 10

def decompile
  "mem[#{k}] = #{reg}"
end

#symbolize[:st, (:a, :x), Integer]



16
17
18
# File 'lib/seccomp-tools/instruction/st.rb', line 16

def symbolize
  [:st, reg.downcase.to_sym, k]
end