| 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 3261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3272 top_frame_awaiter_ = stack_trace_->FrameAt(0)->GetAsyncAwaiter(); | 3272 top_frame_awaiter_ = stack_trace_->FrameAt(0)->GetAsyncAwaiter(); |
| 3273 } else { | 3273 } else { |
| 3274 top_frame_awaiter_ = Object::null(); | 3274 top_frame_awaiter_ = Object::null(); |
| 3275 } | 3275 } |
| 3276 } | 3276 } |
| 3277 | 3277 |
| 3278 void Debugger::SetAsyncSteppingFramePointer() { | 3278 void Debugger::SetAsyncSteppingFramePointer() { |
| 3279 if (!FLAG_async_debugger) { | 3279 if (!FLAG_async_debugger) { |
| 3280 return; | 3280 return; |
| 3281 } | 3281 } |
| 3282 if (stack_trace_->FrameAt(0)->function().IsAsyncClosure() || | 3282 if ((stack_trace_->Length()) > 0 && |
| 3283 stack_trace_->FrameAt(0)->function().IsAsyncGenClosure()) { | 3283 (stack_trace_->FrameAt(0)->function().IsAsyncClosure() || |
| 3284 stack_trace_->FrameAt(0)->function().IsAsyncGenClosure())) { |
| 3284 async_stepping_fp_ = stack_trace_->FrameAt(0)->fp(); | 3285 async_stepping_fp_ = stack_trace_->FrameAt(0)->fp(); |
| 3285 } else { | 3286 } else { |
| 3286 async_stepping_fp_ = 0; | 3287 async_stepping_fp_ = 0; |
| 3287 } | 3288 } |
| 3288 } | 3289 } |
| 3289 | 3290 |
| 3290 void Debugger::HandleSteppingRequest(DebuggerStackTrace* stack_trace, | 3291 void Debugger::HandleSteppingRequest(DebuggerStackTrace* stack_trace, |
| 3291 bool skip_next_step) { | 3292 bool skip_next_step) { |
| 3292 ResetSteppingFramePointers(); | 3293 ResetSteppingFramePointers(); |
| 3293 RememberTopFrameAwaiter(); | 3294 RememberTopFrameAwaiter(); |
| (...skipping 1076 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4370 | 4371 |
| 4371 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { | 4372 void Debugger::RegisterCodeBreakpoint(CodeBreakpoint* bpt) { |
| 4372 ASSERT(bpt->next() == NULL); | 4373 ASSERT(bpt->next() == NULL); |
| 4373 bpt->set_next(code_breakpoints_); | 4374 bpt->set_next(code_breakpoints_); |
| 4374 code_breakpoints_ = bpt; | 4375 code_breakpoints_ = bpt; |
| 4375 } | 4376 } |
| 4376 | 4377 |
| 4377 #endif // !PRODUCT | 4378 #endif // !PRODUCT |
| 4378 | 4379 |
| 4379 } // namespace dart | 4380 } // namespace dart |
| OLD | NEW |