(self, address)
| 2431 | return slot |
| 2432 | |
| 2433 | def TryInferContext(self, address): |
| 2434 | if self.context: |
| 2435 | return |
| 2436 | ptr_size = self.reader.MachinePointerSize() |
| 2437 | possible_context = dict() |
| 2438 | count = 0 |
| 2439 | while self.reader.IsExceptionStackAddress(address): |
| 2440 | prev_addr = self.reader.ReadUIntPtr(address-ptr_size) |
| 2441 | if self.heap.IsTaggedObjectAddress(prev_addr): |
| 2442 | if prev_addr in possible_context: |
| 2443 | possible_context[prev_addr] += 1 |
| 2444 | else: |
| 2445 | possible_context[prev_addr] = 1 |
| 2446 | address = self.reader.ReadUIntPtr(address) |
| 2447 | count += 1 |
| 2448 | if count <= 5 or len(possible_context) == 0: |
| 2449 | return |
| 2450 | # Find entry with highest count |
| 2451 | possible_context = list(possible_context.items()) |
| 2452 | possible_context.sort(key=lambda pair: pair[1]) |
| 2453 | address,count = possible_context[-1] |
| 2454 | if count <= 4: |
| 2455 | return |
| 2456 | self.context = address |
| 2457 | |
| 2458 | def InterpretMemory(self, start, end): |
| 2459 | # On 64 bit we omit frame pointers, so we have to do some more guesswork. |
no test coverage detected