| 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 "vm/debugger.h" | 5 #include "vm/debugger.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 | 8 |
| 9 #include "platform/address_sanitizer.h" | 9 #include "platform/address_sanitizer.h" |
| 10 | 10 |
| (...skipping 1662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1673 | 1673 |
| 1674 intptr_t synchronous_stack_trace_length = | 1674 intptr_t synchronous_stack_trace_length = |
| 1675 StackTraceUtils::CountFrames(thread, 0, async_function); | 1675 StackTraceUtils::CountFrames(thread, 0, async_function); |
| 1676 | 1676 |
| 1677 // Append the top frames from the synchronous stack trace, up until the active | 1677 // Append the top frames from the synchronous stack trace, up until the active |
| 1678 // asynchronous function. We truncate the remainder of the synchronous | 1678 // asynchronous function. We truncate the remainder of the synchronous |
| 1679 // stack trace because it contains activations that are part of the | 1679 // stack trace because it contains activations that are part of the |
| 1680 // asynchronous dispatch mechanisms. | 1680 // asynchronous dispatch mechanisms. |
| 1681 StackFrameIterator iterator(false); | 1681 StackFrameIterator iterator(false); |
| 1682 StackFrame* frame = iterator.NextFrame(); | 1682 StackFrame* frame = iterator.NextFrame(); |
| 1683 while (synchronous_stack_trace_length >= 0) { | 1683 while (synchronous_stack_trace_length > 0) { |
| 1684 ASSERT(frame != NULL); | 1684 ASSERT(frame != NULL); |
| 1685 if (frame->IsDartFrame()) { | 1685 if (frame->IsDartFrame()) { |
| 1686 code = frame->LookupDartCode(); | 1686 code = frame->LookupDartCode(); |
| 1687 AppendCodeFrames(thread, isolate, zone, stack_trace, frame, &code, | 1687 AppendCodeFrames(thread, isolate, zone, stack_trace, frame, &code, |
| 1688 &inlined_code, &deopt_frame); | 1688 &inlined_code, &deopt_frame); |
| 1689 synchronous_stack_trace_length--; | 1689 synchronous_stack_trace_length--; |
| 1690 } | 1690 } |
| 1691 frame = iterator.NextFrame(); | 1691 frame = iterator.NextFrame(); |
| 1692 } | 1692 } |
| 1693 | 1693 |
| (...skipping 2137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3831 | 3831 |
| 3832 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 3832 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 3833 ASSERT(bpt->next() == NULL); | 3833 ASSERT(bpt->next() == NULL); |
| 3834 bpt->set_next(code_breakpoints_); | 3834 bpt->set_next(code_breakpoints_); |
| 3835 code_breakpoints_ = bpt; | 3835 code_breakpoints_ = bpt; |
| 3836 } | 3836 } |
| 3837 | 3837 |
| 3838 #endif // !PRODUCT | 3838 #endif // !PRODUCT |
| 3839 | 3839 |
| 3840 } // namespace dart | 3840 } // namespace dart |
| OLD | NEW |