Similar to getFrame, but handles partially saved frames. Relevant for allocation hooks executed in _thread_in_vm state.
| 354 | // Similar to getFrame, but handles partially saved frames. |
| 355 | // Relevant for allocation hooks executed in _thread_in_vm state. |
| 356 | bool restoreFrame(const void*& pc, uintptr_t& sp, uintptr_t& fp) { |
| 357 | if (lastJavaSP() == 0) { |
| 358 | return false; |
| 359 | } |
| 360 | |
| 361 | sp = lastJavaSP(); |
| 362 | if ((fp = lastJavaFP()) == 0) { |
| 363 | fp = sp; |
| 364 | } |
| 365 | if ((pc = lastJavaPC()) == NULL) { |
| 366 | pc = ((const void**)sp)[-1]; |
| 367 | } |
| 368 | return true; |
| 369 | } |
| 370 | }; |
| 371 | |
| 372 | class VMThread : VMStructs { |