hotspot/src/os_cpu/solaris_x86/vm/os_solaris_x86.cpp
changeset 40382 7537c0ce2df3
parent 40010 e32d5e545789
child 40655 9f644073d3a0
equal deleted inserted replaced
40381:1f2c47214988 40382:7537c0ce2df3
   290 
   290 
   291 extern "C" intptr_t *_get_current_fp();  // in .il file
   291 extern "C" intptr_t *_get_current_fp();  // in .il file
   292 
   292 
   293 frame os::current_frame() {
   293 frame os::current_frame() {
   294   intptr_t* fp = _get_current_fp();  // it's inlined so want current fp
   294   intptr_t* fp = _get_current_fp();  // it's inlined so want current fp
       
   295   // fp is for os::current_frame. We want the fp for our caller.
   295   frame myframe((intptr_t*)os::current_stack_pointer(),
   296   frame myframe((intptr_t*)os::current_stack_pointer(),
   296                 (intptr_t*)fp,
   297                 (intptr_t*)fp,
   297                 CAST_FROM_FN_PTR(address, os::current_frame));
   298                 CAST_FROM_FN_PTR(address, os::current_frame));
   298   if (os::is_first_C_frame(&myframe)) {
   299   frame caller_frame = os::get_sender_for_C_frame(&myframe);
       
   300 
       
   301   if (os::is_first_C_frame(&caller_frame)) {
   299     // stack is not walkable
   302     // stack is not walkable
   300     frame ret; // This will be a null useless frame
   303     frame ret; // This will be a null useless frame
   301     return ret;
   304     return ret;
   302   } else {
   305   } else {
   303     return os::get_sender_for_C_frame(&myframe);
   306     // return frame for our caller's caller
       
   307     return os::get_sender_for_C_frame(&caller_frame);
   304   }
   308   }
   305 }
   309 }
   306 
   310 
   307 #ifndef AMD64
   311 #ifndef AMD64
   308 
   312