Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 36b3177b7c02c474b058bc3f0f8f2a8c1aa5b4c1..b0b585191d81b8fbfdd5fb617182dc5ab5464493 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -11192,9 +11192,10 @@ static const int kFrameDetailsLocalCountIndex = 4; |
static const int kFrameDetailsSourcePositionIndex = 5; |
static const int kFrameDetailsConstructCallIndex = 6; |
static const int kFrameDetailsAtReturnIndex = 7; |
-static const int kFrameDetailsFlagsIndex = 8; |
-static const int kFrameDetailsFirstDynamicIndex = 9; |
- |
+static const int kFrameDetailsFramePointerHighIndex = 8; |
+static const int kFrameDetailsFramePointerLowIndex = 9; |
+static const int kFrameDetailsFlagsIndex = 10; |
+static const int kFrameDetailsFirstDynamicIndex = 11; |
static SaveContext* FindSavedContextForFrame(Isolate* isolate, |
JavaScriptFrame* frame) { |
@@ -11220,7 +11221,9 @@ static SaveContext* FindSavedContextForFrame(Isolate* isolate, |
// 5: Source position |
// 6: Constructor call |
// 7: Is at return |
-// 8: Flags |
+// 8: Frame pointer high |
+// 9: Frame pointer low |
+// 10: Flags |
// Arguments name, value |
// Locals name, value |
// Return value if any |
@@ -11405,6 +11408,16 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) { |
// Add the at return information. |
details->set(kFrameDetailsAtReturnIndex, heap->ToBoolean(at_return)); |
+ uintptr_t frame_pointer = |
+ reinterpret_cast<uintptr_t>(it.frame()->UnpaddedFP()); |
+ |
+ details->set(kFrameDetailsFramePointerHighIndex, |
+ *isolate->factory()->NewNumberFromUint( |
Vyacheslav Egorov (Google)
2014/09/10 22:34:25
this is GC unsafe in V8, you need to split it into
Jacob
2014/09/11 00:45:56
Done.
|
+ static_cast<uint32_t>(frame_pointer >> 32))); |
+ details->set(kFrameDetailsFramePointerLowIndex, |
+ *isolate->factory()->NewNumberFromUint( |
+ static_cast<uint32_t>(frame_pointer & 0xffffffff))); |
+ |
// Add flags to indicate information on whether this frame is |
// bit 0: invoked in the debugger context. |
// bit 1: optimized frame. |