Class: SeccompTools::Instruction::MISC
- Defined in:
- lib/seccomp-tools/instruction/misc.rb
Overview
Instruction misc.
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
-
#branch(context) ⇒ Array<(Integer, Context)>
See Base#branch.
-
#decompile ⇒ Object
Decompile instruction.
-
#symbolize ⇒ [:misc, (:tax, :txa)]
See Base#symbolize.
Methods inherited from Base
Constructor Details
This class inherits a constructor from SeccompTools::Instruction::Base
Instance Method Details
#branch(context) ⇒ Array<(Integer, Context)>
See Base#branch.
27 28 29 30 31 32 33 34 |
# File 'lib/seccomp-tools/instruction/misc.rb', line 27 def branch(context) ctx = context.dup case op when :txa then ctx['A'] = ctx['X'] when :tax then ctx['X'] = ctx['A'] end [[line + 1, ctx]] end |
#decompile ⇒ Object
Decompile instruction.
10 11 12 13 14 15 |
# File 'lib/seccomp-tools/instruction/misc.rb', line 10 def decompile case op when :txa then 'A = X' when :tax then 'X = A' end end |
#symbolize ⇒ [:misc, (:tax, :txa)]
See Base#symbolize.
19 20 21 |
# File 'lib/seccomp-tools/instruction/misc.rb', line 19 def symbolize [:misc, op] end |