MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / _buildStartCache

Method _buildStartCache

python/basicblock.py:204–218  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

202 return self.start <= i < self.end
203
204 def _buildStartCache(self) -> None:
205 if self._instStarts is None:
206 # build the instruction start cache
207 if self.view is None:
208 raise Exception("Attempting to buildStartCache when BinaryView for BasicBlock is None")
209 self._instStarts = []
210 self._instLengths = []
211 start = self.start
212 while start < self.end:
213 length = self.view.get_instruction_length(start, self.arch)
214 if length == 0: # invalid instruction. avoid infinite loop
215 break
216 self._instLengths.append(length)
217 self._instStarts.append(start)
218 start += length
219
220 def _create_instance(self, handle: core.BNBasicBlockHandle) -> 'BasicBlock':
221 """Internal method used to instantiate child instances"""

Callers 2

__getitem__Method · 0.95
instruction_countMethod · 0.95

Calls 2

appendMethod · 0.45

Tested by

no test coverage detected