397 #ifdef AMD64 |
397 #ifdef AMD64 |
398 // apparently _asm not supported on windows amd64 |
398 // apparently _asm not supported on windows amd64 |
399 typedef intptr_t* get_fp_func (); |
399 typedef intptr_t* get_fp_func (); |
400 get_fp_func* func = CAST_TO_FN_PTR(get_fp_func*, |
400 get_fp_func* func = CAST_TO_FN_PTR(get_fp_func*, |
401 StubRoutines::x86::get_previous_fp_entry()); |
401 StubRoutines::x86::get_previous_fp_entry()); |
402 if (func == NULL) return frame(NULL, NULL, NULL); |
402 if (func == NULL) return frame(); |
403 intptr_t* fp = (*func)(); |
403 intptr_t* fp = (*func)(); |
404 #else |
404 #else |
405 intptr_t* fp = _get_previous_fp(); |
405 intptr_t* fp = _get_previous_fp(); |
406 #endif // AMD64 |
406 #endif // AMD64 |
407 |
407 |
408 frame myframe((intptr_t*)os::current_stack_pointer(), |
408 frame myframe((intptr_t*)os::current_stack_pointer(), |
409 (intptr_t*)fp, |
409 (intptr_t*)fp, |
410 CAST_FROM_FN_PTR(address, os::current_frame)); |
410 CAST_FROM_FN_PTR(address, os::current_frame)); |
411 if (os::is_first_C_frame(&myframe)) { |
411 if (os::is_first_C_frame(&myframe)) { |
412 // stack is not walkable |
412 // stack is not walkable |
413 return frame(NULL, NULL, NULL); |
413 return frame(); |
414 } else { |
414 } else { |
415 return os::get_sender_for_C_frame(&myframe); |
415 return os::get_sender_for_C_frame(&myframe); |
416 } |
416 } |
417 } |
417 } |
418 |
418 |