767 fp = sp + wordSize * (cb->frame_size() - 2); 768 } 769 internal_pf(sp, fp, pc, bcx); 770 } 771 772 // support for printing out where we are in a Java method 773 // needs to be passed current fp and bcp register values 774 // prints method name, bc index and bytecode name 775 extern "C" void pm(unsigned long fp, unsigned long bcx) { 776 DESCRIBE_FP_OFFSET(interpreter_frame_method); 777 unsigned long *p = (unsigned long *)fp; 778 Method* m = (Method*)p[frame::interpreter_frame_method_offset]; 779 printbc(m, bcx); 780 } 781 782 #ifndef PRODUCT 783 // This is a generic constructor which is only used by pns() in debug.cpp. 784 frame::frame(void* sp, void* fp, void* pc) { 785 init((intptr_t*)sp, (intptr_t*)fp, (address)pc); 786 } 787 #endif 788 789 void JavaFrameAnchor::make_walkable(JavaThread* thread) { 790 // last frame set? 791 if (last_Java_sp() == NULL) return; 792 // already walkable? 793 if (walkable()) return; 794 vmassert(Thread::current() == (Thread*)thread, "not current thread"); 795 vmassert(last_Java_sp() != NULL, "not called from Java code?"); 796 vmassert(last_Java_pc() == NULL, "already walkable"); 797 capture_last_Java_pc(); 798 vmassert(walkable(), "something went wrong"); 799 } 800 801 void JavaFrameAnchor::capture_last_Java_pc() { 802 vmassert(_last_Java_sp != NULL, "no last frame set"); 803 vmassert(_last_Java_pc == NULL, "already walkable"); 804 _last_Java_pc = (address)_last_Java_sp[-1]; 805 } | 767 fp = sp + wordSize * (cb->frame_size() - 2); 768 } 769 internal_pf(sp, fp, pc, bcx); 770 } 771 772 // support for printing out where we are in a Java method 773 // needs to be passed current fp and bcp register values 774 // prints method name, bc index and bytecode name 775 extern "C" void pm(unsigned long fp, unsigned long bcx) { 776 DESCRIBE_FP_OFFSET(interpreter_frame_method); 777 unsigned long *p = (unsigned long *)fp; 778 Method* m = (Method*)p[frame::interpreter_frame_method_offset]; 779 printbc(m, bcx); 780 } 781 782 #ifndef PRODUCT 783 // This is a generic constructor which is only used by pns() in debug.cpp. 784 frame::frame(void* sp, void* fp, void* pc) { 785 init((intptr_t*)sp, (intptr_t*)fp, (address)pc); 786 } 787 788 void frame::pd_ps() {} 789 #endif 790 791 void JavaFrameAnchor::make_walkable(JavaThread* thread) { 792 // last frame set? 793 if (last_Java_sp() == NULL) return; 794 // already walkable? 795 if (walkable()) return; 796 vmassert(Thread::current() == (Thread*)thread, "not current thread"); 797 vmassert(last_Java_sp() != NULL, "not called from Java code?"); 798 vmassert(last_Java_pc() == NULL, "already walkable"); 799 capture_last_Java_pc(); 800 vmassert(walkable(), "something went wrong"); 801 } 802 803 void JavaFrameAnchor::capture_last_Java_pc() { 804 vmassert(_last_Java_sp != NULL, "no last frame set"); 805 vmassert(_last_Java_pc == NULL, "already walkable"); 806 _last_Java_pc = (address)_last_Java_sp[-1]; 807 } |