MCPcopy Create free account
hub / github.com/qilingframework/qiling / __init__

Method __init__

qiling/loader/mcu.py:16–34  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

14
15class IhexParser:
16 def __init__(self, path):
17 self.mem = []
18 self.segments = []
19
20 self.base = 0
21 with open(path, 'r') as f:
22 for line in f.read().splitlines():
23 self.parse_line(line.strip())
24
25 begin, stream = 0, b''
26 for addr, data in self.mem:
27 if addr != begin + len(stream):
28 self.segments.append((begin, stream))
29 begin, stream = addr, data
30
31 else:
32 stream += data
33
34 self.segments.append((begin, stream))
35
36 def parse_line(self, line):
37 if len(line) < 9:

Callers 1

__init__Method · 0.45

Calls 3

parse_lineMethod · 0.95
readMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected