MCPcopy Create free account
hub / github.com/capstone-engine/capstone / get_code

Function get_code

suite/benchmark.py:48–55  ·  view source on GitHub ↗
(f, size)

Source from the content-addressed store, hash-verified

46 return " ".join("0x" + "{0:x}".format(ord(c)).zfill(2) for c in s) # <-- Python 3 is OK
47
48def get_code(f, size):
49 code = f.read(size)
50 if len(code) != size: # reached end-of-file?
51 # then reset file position to begin-of-file
52 f.seek(0)
53 code = f.read(size)
54
55 return code
56
57
58def cs(md, code):

Callers 1

benchmark.pyFile · 0.70

Calls 1

readMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…