1003 if (ClassLoaderDataGraph::contains((address)addr)) {
1004 // Use addr->print() from the debugger instead (not here)
1005 st->print_cr(INTPTR_FORMAT
1006 " is pointing into metadata", addr);
1007 return;
1008 }
1009 #endif
1010
1011 // Try an OS specific find
1012 if (os::find(addr, st)) {
1013 return;
1014 }
1015
1016 st->print_cr(INTPTR_FORMAT " is an unknown value", addr);
1017 }
1018
1019 // Looks like all platforms except IA64 can use the same function to check
1020 // if C stack is walkable beyond current frame. The check for fp() is not
1021 // necessary on Sparc, but it's harmless.
1022 bool os::is_first_C_frame(frame* fr) {
1023 #if defined(IA64) && !defined(_WIN32)
1024 // On IA64 we have to check if the callers bsp is still valid
1025 // (i.e. within the register stack bounds).
1026 // Notice: this only works for threads created by the VM and only if
1027 // we walk the current stack!!! If we want to be able to walk
1028 // arbitrary other threads, we'll have to somehow store the thread
1029 // object in the frame.
1030 Thread *thread = Thread::current();
1031 if ((address)fr->fp() <=
1032 thread->register_stack_base() HPUX_ONLY(+ 0x0) LINUX_ONLY(+ 0x50)) {
1033 // This check is a little hacky, because on Linux the first C
1034 // frame's ('start_thread') register stack frame starts at
1035 // "register_stack_base + 0x48" while on HPUX, the first C frame's
1036 // ('__pthread_bound_body') register stack frame seems to really
1037 // start at "register_stack_base".
1038 return true;
1039 } else {
1040 return false;
1041 }
1042 #elif defined(IA64) && defined(_WIN32)
1043 return true;
|
1003 if (ClassLoaderDataGraph::contains((address)addr)) {
1004 // Use addr->print() from the debugger instead (not here)
1005 st->print_cr(INTPTR_FORMAT
1006 " is pointing into metadata", addr);
1007 return;
1008 }
1009 #endif
1010
1011 // Try an OS specific find
1012 if (os::find(addr, st)) {
1013 return;
1014 }
1015
1016 st->print_cr(INTPTR_FORMAT " is an unknown value", addr);
1017 }
1018
1019 // Looks like all platforms except IA64 can use the same function to check
1020 // if C stack is walkable beyond current frame. The check for fp() is not
1021 // necessary on Sparc, but it's harmless.
1022 bool os::is_first_C_frame(frame* fr) {
1023 #if (defined(IA64) && !defined(AIX)) && !defined(_WIN32)
1024 // On IA64 we have to check if the callers bsp is still valid
1025 // (i.e. within the register stack bounds).
1026 // Notice: this only works for threads created by the VM and only if
1027 // we walk the current stack!!! If we want to be able to walk
1028 // arbitrary other threads, we'll have to somehow store the thread
1029 // object in the frame.
1030 Thread *thread = Thread::current();
1031 if ((address)fr->fp() <=
1032 thread->register_stack_base() HPUX_ONLY(+ 0x0) LINUX_ONLY(+ 0x50)) {
1033 // This check is a little hacky, because on Linux the first C
1034 // frame's ('start_thread') register stack frame starts at
1035 // "register_stack_base + 0x48" while on HPUX, the first C frame's
1036 // ('__pthread_bound_body') register stack frame seems to really
1037 // start at "register_stack_base".
1038 return true;
1039 } else {
1040 return false;
1041 }
1042 #elif defined(IA64) && defined(_WIN32)
1043 return true;
|