| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 Thread* thread = Thread::Current(); | 103 Thread* thread = Thread::Current(); |
| 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, 0) { | 113 DEFINE_NATIVE_ENTRY(StackTrace_asyncStackTraceHelper, 1) { |
| 114 GET_NON_NULL_NATIVE_ARGUMENT(Closure, async_op, arguments->NativeArgAt(0)); |
| 115 if (FLAG_support_debugger) { |
| 116 Debugger* debugger = isolate->debugger(); |
| 117 if (debugger != NULL) { |
| 118 debugger->MaybeAsyncStepInto(async_op); |
| 119 } |
| 120 } |
| 114 return CurrentStackTrace(thread, true); | 121 return CurrentStackTrace(thread, true); |
| 115 } | 122 } |
| 116 | 123 |
| 117 | 124 |
| 118 DEFINE_NATIVE_ENTRY(StackTrace_clearAsyncThreadStackTrace, 0) { | 125 DEFINE_NATIVE_ENTRY(StackTrace_clearAsyncThreadStackTrace, 0) { |
| 119 thread->clear_async_stack_trace(); | 126 thread->clear_async_stack_trace(); |
| 120 return Object::null(); | 127 return Object::null(); |
| 121 } | 128 } |
| 122 | 129 |
| 123 | 130 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 void _printCurrentStackTraceNoSafepoint() { | 193 void _printCurrentStackTraceNoSafepoint() { |
| 187 StackFrameIterator frames(StackFrameIterator::kDontValidateFrames); | 194 StackFrameIterator frames(StackFrameIterator::kDontValidateFrames); |
| 188 StackFrame* frame = frames.NextFrame(); | 195 StackFrame* frame = frames.NextFrame(); |
| 189 while (frame != NULL) { | 196 while (frame != NULL) { |
| 190 OS::PrintErr("%s\n", frame->ToCString()); | 197 OS::PrintErr("%s\n", frame->ToCString()); |
| 191 frame = frames.NextFrame(); | 198 frame = frames.NextFrame(); |
| 192 } | 199 } |
| 193 } | 200 } |
| 194 | 201 |
| 195 } // namespace dart | 202 } // namespace dart |
| OLD | NEW |