| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "include/dart_mirrors_api.h" | 5 #include "include/dart_mirrors_api.h" |
| 6 #include "include/dart_tools_api.h" | 6 #include "include/dart_tools_api.h" |
| 7 #include "platform/assert.h" | 7 #include "platform/assert.h" |
| 8 #include "vm/dart_api_impl.h" | 8 #include "vm/dart_api_impl.h" |
| 9 #include "vm/lockers.h" | 9 #include "vm/lockers.h" |
| 10 #include "vm/unit_test.h" | 10 #include "vm/unit_test.h" |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 EXPECT_EQ(2, int_value); | 656 EXPECT_EQ(2, int_value); |
| 657 EXPECT(breakpoint_hit == true); | 657 EXPECT(breakpoint_hit == true); |
| 658 } | 658 } |
| 659 | 659 |
| 660 static const char* step_into_expected_bpts[] = { | 660 static const char* step_into_expected_bpts[] = { |
| 661 "main", // entry | 661 "main", // entry |
| 662 "main", // call foo | 662 "main", // call foo |
| 663 "foo", // entry | 663 "foo", // entry |
| 664 "foo", // call f1 | 664 "foo", // call f1 |
| 665 "f1", // entry | 665 "f1", // entry |
| 666 "f1", // return |
| 666 "foo", // call initializer | 667 "foo", // call initializer |
| 667 "foo", // call kvmk | 668 "foo", // call kvmk |
| 668 "X.kvmk", // entry | 669 "X.kvmk", // entry |
| 669 "X.kvmk", // call | 670 "X.kvmk", // call |
| 670 "f2", // entry | 671 "f2", // entry |
| 671 "f2", // return | 672 "f2", // return |
| 672 "X.kvmk", // call + | 673 "X.kvmk", // call + |
| 673 "X.kvmk", // return | 674 "X.kvmk", // return |
| 674 "foo", // return | 675 "foo", // return |
| 675 "main" // return | 676 "main" // return |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 825 EXPECT(breakpoint_hit == true); | 826 EXPECT(breakpoint_hit == true); |
| 826 } | 827 } |
| 827 | 828 |
| 828 | 829 |
| 829 void TestSingleStepHandler(Dart_IsolateId isolate_id, | 830 void TestSingleStepHandler(Dart_IsolateId isolate_id, |
| 830 intptr_t bp_id, | 831 intptr_t bp_id, |
| 831 const Dart_CodeLocation& location) { | 832 const Dart_CodeLocation& location) { |
| 832 Dart_StackTrace trace; | 833 Dart_StackTrace trace; |
| 833 Dart_GetStackTrace(&trace); | 834 Dart_GetStackTrace(&trace); |
| 834 const char* expected_bpts[] = { | 835 const char* expected_bpts[] = { |
| 835 "moo", "foo", "moo", "foo", "moo", "foo", "main"}; | 836 "moo", "moo", "foo", "moo", "moo", "foo", "moo", "moo", "foo", "main"}; |
| 836 const intptr_t expected_bpts_length = ARRAY_SIZE(expected_bpts); | 837 const intptr_t expected_bpts_length = ARRAY_SIZE(expected_bpts); |
| 837 intptr_t trace_len; | 838 intptr_t trace_len; |
| 838 Dart_Handle res = Dart_StackTraceLength(trace, &trace_len); | 839 Dart_Handle res = Dart_StackTraceLength(trace, &trace_len); |
| 839 EXPECT_VALID(res); | 840 EXPECT_VALID(res); |
| 840 EXPECT(breakpoint_hit_counter < expected_bpts_length); | 841 EXPECT(breakpoint_hit_counter < expected_bpts_length); |
| 841 Dart_ActivationFrame frame; | 842 Dart_ActivationFrame frame; |
| 842 res = Dart_GetActivationFrame(trace, 0, &frame); | 843 res = Dart_GetActivationFrame(trace, 0, &frame); |
| 843 EXPECT_VALID(res); | 844 EXPECT_VALID(res); |
| 844 Dart_Handle func_name; | 845 Dart_Handle func_name; |
| 845 res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL); | 846 res = Dart_ActivationFrameInfo(frame, &func_name, NULL, NULL, NULL); |
| (...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2314 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," | 2315 " null, 3, 7, 1, 8, 6, 9, 10, 10, 11, 11, 13," |
| 2315 " null, 4, 13, 3, 14, 10," | 2316 " null, 4, 13, 3, 14, 10," |
| 2316 " null, 5, 17, 5, 18, 9, 19, 12," | 2317 " null, 5, 17, 5, 18, 9, 19, 12," |
| 2317 " null, 6, 21, 1," | 2318 " null, 6, 21, 1," |
| 2318 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," | 2319 " null, 8, 24, 1, 25, 5, 26, 6, 27, 8," |
| 2319 " null, 9, 29, 1]", | 2320 " null, 9, 29, 1]", |
| 2320 tokens_cstr); | 2321 tokens_cstr); |
| 2321 } | 2322 } |
| 2322 | 2323 |
| 2323 } // namespace dart | 2324 } // namespace dart |
| OLD | NEW |