MCPcopy Create free account
hub / github.com/iovisor/bcc / build_instr

Method build_instr

tests/python/test_disassembler.py:121–126  ·  view source on GitHub ↗
(cls, op)

Source from the content-addressed store, hash-verified

119
120 @classmethod
121 def build_instr(cls, op):
122 dst = random.randint(0, 0xf)
123 src = random.randint(0, 0xf)
124 offset = random.randint(0, 0xffff)
125 imm = random.randint(0, 0xffffffff)
126 return BPFInstr(op, dst, src, offset, imm)
127
128 @classmethod
129 def format_instr(cls, instr, fmt):

Callers 1

test_bpf_isaMethod · 0.95

Calls 1

BPFInstrClass · 0.70

Tested by

no test coverage detected