Get the memory breakpoint that handle ``addr`` Return values are: * ``False`` if the page has no memory breakpoint (real fault) * ``None`` if the page as memBP but None handle ``addr`` * ``bp`` the MemBP that handle ``addr``
(self, addr, process=None)
| 958 | |
| 959 | ## Memory Breakpoint helper |
| 960 | def get_memory_breakpoint_at(self, addr, process=None): |
| 961 | """Get the memory breakpoint that handle ``addr`` |
| 962 | |
| 963 | Return values are: |
| 964 | |
| 965 | * ``False`` if the page has no memory breakpoint (real fault) |
| 966 | * ``None`` if the page as memBP but None handle ``addr`` |
| 967 | * ``bp`` the MemBP that handle ``addr`` |
| 968 | """ |
| 969 | if process is None: |
| 970 | process = self.current_process |
| 971 | |
| 972 | fault_page = (addr >> 12) << 12 |
| 973 | if fault_page not in self._watched_pages[process.pid]: |
| 974 | return False |
| 975 | |
| 976 | for bp in self._watched_pages[process.pid][fault_page].bps: |
| 977 | if bp._addr <= addr < bp._addr + bp.size: |
| 978 | return bp |
| 979 | return None |
| 980 | |
| 981 | def disable_all_memory_breakpoints(self, target=None): |
| 982 | """Restore all pages to their original access rights. |
no outgoing calls
no test coverage detected