src/hotspot/os_cpu/linux_arm/thread_linux_arm.cpp
changeset 49480 d7df2dd501ce
parent 49455 848864ed9b17
child 49484 ee8fa73b90f9
--- a/src/hotspot/os_cpu/linux_arm/thread_linux_arm.cpp	Wed Mar 21 17:09:34 2018 -0400
+++ b/src/hotspot/os_cpu/linux_arm/thread_linux_arm.cpp	Wed Mar 21 19:45:24 2018 -0400
@@ -30,6 +30,21 @@
 #include "memory/metaspaceShared.hpp"
 #include "runtime/frame.inline.hpp"
 
+frame JavaThread::pd_last_frame() {
+  assert(has_last_Java_frame(), "must have last_Java_sp() when suspended");
+#ifdef AARCH64
+  assert (_anchor.last_Java_pc() != NULL, "pc should be stored");
+  return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
+#else
+  if (_anchor.last_Java_pc() != NULL) {
+    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc());
+  } else {
+    // This will pick up pc from sp
+    return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp());
+  }
+#endif // AARCH64
+}
+
 void JavaThread::cache_global_variables() {
   BarrierSet* bs = Universe::heap()->barrier_set();