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_debugger_api.h" | 5 #include "include/dart_debugger_api.h" |
6 #include "platform/assert.h" | 6 #include "platform/assert.h" |
7 #include "vm/dart_api_impl.h" | 7 #include "vm/dart_api_impl.h" |
8 #include "vm/unit_test.h" | 8 #include "vm/unit_test.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 Dart_ActivationFrame frame; | 58 Dart_ActivationFrame frame; |
59 Dart_Handle res = Dart_GetActivationFrame(trace, 0, &frame); | 59 Dart_Handle res = Dart_GetActivationFrame(trace, 0, &frame); |
60 EXPECT_VALID(res); | 60 EXPECT_VALID(res); |
61 Dart_Handle func_name; | 61 Dart_Handle func_name; |
62 Dart_Handle url; | 62 Dart_Handle url; |
63 intptr_t line_number = 0; | 63 intptr_t line_number = 0; |
64 intptr_t library_id = 0; | 64 intptr_t library_id = 0; |
65 res = Dart_ActivationFrameInfo( | 65 res = Dart_ActivationFrameInfo( |
66 frame, &func_name, &url, &line_number, &library_id); | 66 frame, &func_name, &url, &line_number, &library_id); |
67 EXPECT_VALID(res); | 67 EXPECT_VALID(res); |
68 OS::SNPrint(info_str, sizeof(info_str), "function %s (%s:%d)", | 68 OS::SNPrint(info_str, sizeof(info_str), "function %s (%s:%"Pd")", |
69 ToCString(func_name), ToCString(url), line_number); | 69 ToCString(func_name), ToCString(url), line_number); |
70 return info_str; | 70 return info_str; |
71 } | 71 } |
72 | 72 |
73 | 73 |
74 static void PrintValue(Dart_Handle value, bool expand); | 74 static void PrintValue(Dart_Handle value, bool expand); |
75 | 75 |
76 | 76 |
77 static void PrintObjectList(Dart_Handle list, const char* prefix, bool expand) { | 77 static void PrintObjectList(Dart_Handle list, const char* prefix, bool expand) { |
78 intptr_t list_length = 0; | 78 intptr_t list_length = 0; |
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 list_as_string = Dart_ToString(lib_list); | 1035 list_as_string = Dart_ToString(lib_list); |
1036 list_cstr = ""; | 1036 list_cstr = ""; |
1037 EXPECT_VALID(Dart_StringToCString(list_as_string, &list_cstr)); | 1037 EXPECT_VALID(Dart_StringToCString(list_as_string, &list_cstr)); |
1038 EXPECT_SUBSTRING(TestCase::url(), list_cstr); | 1038 EXPECT_SUBSTRING(TestCase::url(), list_cstr); |
1039 } | 1039 } |
1040 | 1040 |
1041 | 1041 |
1042 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 1042 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
1043 | 1043 |
1044 } // namespace dart | 1044 } // namespace dart |
OLD | NEW |