| 129 | } |
| 130 | |
| 131 | void PointerScanModel::findPointerChain(uintptr_t addr, int ml, int max_offset) |
| 132 | { |
| 133 | static uint64_t last_scan_frame = 1 << 30; |
| 134 | /* Don't locate pointers again if this is the same frame */ |
| 135 | if (last_scan_frame != context->framecount) { |
| 136 | locatePointers(); |
| 137 | last_scan_frame = context->framecount; |
| 138 | } |
| 139 | |
| 140 | beginResetModel(); |
| 141 | |
| 142 | max_level = ml; |
| 143 | pointer_chains.clear(); |
| 144 | int offsets[10]; |
| 145 | |
| 146 | // std::cout << "max offset " << max_offset << std::endl; |
| 147 | |
| 148 | recursiveFind(addr, 0, offsets, max_offset); |
| 149 | |
| 150 | /* Sort pointers so that we can intersect with saved pointers */ |
| 151 | std::sort(pointer_chains.begin(), pointer_chains.end()); |
| 152 | |
| 153 | endResetModel(); |
| 154 | } |
| 155 | |
| 156 | void PointerScanModel::recursiveFind(uintptr_t addr, int level, int offsets[], int max_offset) |
| 157 | { |
no test coverage detected