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

Method addressFromLocation

python/examples/triage/byte.py:742–759  ·  view source on GitHub ↗
(self, x, y)

Source from the content-addressed store, hash-verified

740 self.viewport().update()
741
742 def addressFromLocation(self, x, y):
743 if y < 0:
744 y = 0
745 if x < 0:
746 x = 0
747 if x > self.cols:
748 x = self.cols
749 if (y + self.topLine) >= len(self.lines):
750 return self.getEnd()
751 if self.lines[y + self.topLine].separator:
752 return self.lines[y + self.topLine].address - 1
753 result = self.lines[y + self.topLine].address + x
754 if result >= (self.lines[y + self.topLine].address + self.lines[y + self.topLine].length):
755 if (y + self.topLine) == (len(self.lines) - 1):
756 return self.getEnd()
757 else:
758 return self.lines[y + self.topLine].address + self.lines[y + self.topLine].length - 1
759 return result
760
761 def mousePressEvent(self, event):
762 if event.button() != Qt.LeftButton:

Callers 2

mousePressEventMethod · 0.95
mouseMoveEventMethod · 0.95

Calls 1

getEndMethod · 0.95

Tested by

no test coverage detected