OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 "lib/stacktrace.h" | 5 #include "lib/stacktrace.h" |
6 #include "vm/bootstrap_natives.h" | 6 #include "vm/bootstrap_natives.h" |
7 #include "vm/debugger.h" | 7 #include "vm/debugger.h" |
8 #include "vm/exceptions.h" | 8 #include "vm/exceptions.h" |
9 #include "vm/native_entry.h" | 9 #include "vm/native_entry.h" |
10 #include "vm/object_store.h" | 10 #include "vm/object_store.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 return CurrentStackTrace(thread, false, 0); | 104 return CurrentStackTrace(thread, false, 0); |
105 } | 105 } |
106 | 106 |
107 | 107 |
108 DEFINE_NATIVE_ENTRY(StackTrace_current, 0) { | 108 DEFINE_NATIVE_ENTRY(StackTrace_current, 0) { |
109 return CurrentStackTrace(thread, false); | 109 return CurrentStackTrace(thread, false); |
110 } | 110 } |
111 | 111 |
112 | 112 |
113 DEFINE_NATIVE_ENTRY(StackTrace_asyncStackTraceHelper, 1) { | 113 DEFINE_NATIVE_ENTRY(StackTrace_asyncStackTraceHelper, 1) { |
114 GET_NON_NULL_NATIVE_ARGUMENT(Closure, async_op, arguments->NativeArgAt(0)); | 114 GET_NATIVE_ARGUMENT(Closure, async_op, arguments->NativeArgAt(0)); |
115 if (FLAG_support_debugger) { | 115 if (!async_op.IsNull()) { |
116 Debugger* debugger = isolate->debugger(); | 116 if (FLAG_support_debugger) { |
117 if (debugger != NULL) { | 117 Debugger* debugger = isolate->debugger(); |
118 debugger->MaybeAsyncStepInto(async_op); | 118 if (debugger != NULL) { |
| 119 debugger->MaybeAsyncStepInto(async_op); |
| 120 } |
119 } | 121 } |
120 } | 122 } |
121 return CurrentStackTrace(thread, true); | 123 return CurrentStackTrace(thread, true); |
122 } | 124 } |
123 | 125 |
124 | 126 |
125 DEFINE_NATIVE_ENTRY(StackTrace_clearAsyncThreadStackTrace, 0) { | 127 DEFINE_NATIVE_ENTRY(StackTrace_clearAsyncThreadStackTrace, 0) { |
126 thread->clear_async_stack_trace(); | 128 thread->clear_async_stack_trace(); |
127 return Object::null(); | 129 return Object::null(); |
128 } | 130 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 void _printCurrentStackTraceNoSafepoint() { | 195 void _printCurrentStackTraceNoSafepoint() { |
194 StackFrameIterator frames(StackFrameIterator::kDontValidateFrames); | 196 StackFrameIterator frames(StackFrameIterator::kDontValidateFrames); |
195 StackFrame* frame = frames.NextFrame(); | 197 StackFrame* frame = frames.NextFrame(); |
196 while (frame != NULL) { | 198 while (frame != NULL) { |
197 OS::PrintErr("%s\n", frame->ToCString()); | 199 OS::PrintErr("%s\n", frame->ToCString()); |
198 frame = frames.NextFrame(); | 200 frame = frames.NextFrame(); |
199 } | 201 } |
200 } | 202 } |
201 | 203 |
202 } // namespace dart | 204 } // namespace dart |
OLD | NEW |