Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Unified Diff: runtime/vm/debugger_api_impl_test.cc

Issue 545263002: Add ActivationFrame_GetFramePointer method and test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: removed comment that out parameter can be null Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/debugger_api_impl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_api_impl_test.cc
diff --git a/runtime/vm/debugger_api_impl_test.cc b/runtime/vm/debugger_api_impl_test.cc
index 80770115929e886d6678acafa5898f50c7fb9f9b..c7362483c31dff7ab627009c197a0102f1b19bc3 100644
--- a/runtime/vm/debugger_api_impl_test.cc
+++ b/runtime/vm/debugger_api_impl_test.cc
@@ -271,10 +271,20 @@ static void VerifyStackTrace(Dart_StackTrace trace,
intptr_t trace_len;
Dart_Handle res = Dart_StackTraceLength(trace, &trace_len);
EXPECT_TRUE(res);
+ uintptr_t last_frame_pointer = 0;
+ uintptr_t frame_pointer;
for (int i = 0; i < trace_len; i++) {
Dart_ActivationFrame frame;
res = Dart_GetActivationFrame(trace, i, &frame);
EXPECT_TRUE(res);
+
+ res = Dart_ActivationFrameGetFramePointer(frame, &frame_pointer);
+ EXPECT_TRUE(res);
+ if (i > 0) {
+ // We expect the stack to grow from high to low addresses.
+ EXPECT_GT(frame_pointer, last_frame_pointer);
+ }
+ last_frame_pointer = frame_pointer;
if (i < expected_frames) {
VerifyStackFrame(frame, func_names[i], local_vars[i], skip_null_expects);
} else {
« no previous file with comments | « runtime/vm/debugger_api_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698