Index: test/cctest/test-debug.cc |
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc |
index 6375a6c47fe308eae4c9fbe5fd3bc857e4b55d0f..8782bca29000627bc8baf66509db16ae80bf6eda 100644 |
--- a/test/cctest/test-debug.cc |
+++ b/test/cctest/test-debug.cc |
@@ -7189,6 +7189,8 @@ static void DebugBreakInlineListener( |
int frame_count = result->Int32Value(); |
CHECK_EQ(expected_frame_count, frame_count); |
+ uint32_t last_frame_pointer_high; |
+ uint32_t last_frame_pointer_low; |
for (int i = 0; i < frame_count; i++) { |
// The 5. element in the returned array of GetFrameDetails contains the |
// source position of that frame. |
@@ -7196,6 +7198,24 @@ static void DebugBreakInlineListener( |
v8::Local<v8::Value> result = CompileRun(script); |
CHECK_EQ(expected_line_number[i], |
i::Script::GetLineNumber(source_script, result->Int32Value())); |
+ |
+ // The 8. element in the returned array of GetFrameDetails contains the |
+ // high address of the frame pointer. |
+ SNPrintF(script_vector, "%%GetFrameDetails(%d, %d)[8]", break_id, i); |
+ uint32_t frame_pointer_high = CompileRun(script)->Uint32Value(); |
+ |
+ // The 9. element in the returned array of GetFrameDetails contains the |
+ // low address of the frame pointer. |
+ SNPrintF(script_vector, "%%GetFrameDetails(%d, %d)[9]", break_id, i); |
+ uint32_t frame_pointer_low = CompileRun(script)->Uint32Value(); |
+ |
+ if (i > 0) { |
+ // We expect the stack to grow from high to low addresses. |
+ CHECK(last_frame_pointer_high < frame_pointer_high || |
+ last_frame_pointer_low <= frame_pointer_low); |
+ } |
+ last_frame_pointer_high = frame_pointer_high; |
+ last_frame_pointer_low = frame_pointer_low; |
} |
v8::Debug::SetDebugEventListener(NULL); |
v8::V8::TerminateExecution(CcTest::isolate()); |