Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(601)

Side by Side Diff: runtime/vm/debugger.h

Issue 1299083002: Automagically change the meaning of 'next' to 'async-next' when paused at an async function at awai… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/observatory/tests/service/test_helper.dart ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef VM_DEBUGGER_H_ 5 #ifndef VM_DEBUGGER_H_
6 #define VM_DEBUGGER_H_ 6 #define VM_DEBUGGER_H_
7 7
8 #include "include/dart_tools_api.h" 8 #include "include/dart_tools_api.h"
9 9
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 kIsolateShutdown = 5, 347 kIsolateShutdown = 5,
348 kIsolateInterrupted = 6, 348 kIsolateInterrupted = 6,
349 }; 349 };
350 350
351 explicit DebuggerEvent(Isolate* isolate, EventType event_type) 351 explicit DebuggerEvent(Isolate* isolate, EventType event_type)
352 : isolate_(isolate), 352 : isolate_(isolate),
353 type_(event_type), 353 type_(event_type),
354 top_frame_(NULL), 354 top_frame_(NULL),
355 breakpoint_(NULL), 355 breakpoint_(NULL),
356 exception_(NULL), 356 exception_(NULL),
357 async_continuation_(NULL) {} 357 async_continuation_(NULL),
358 at_async_jump_(false) {}
358 359
359 Isolate* isolate() const { return isolate_; } 360 Isolate* isolate() const { return isolate_; }
360 361
361 EventType type() const { return type_; } 362 EventType type() const { return type_; }
362 363
363 bool IsPauseEvent() const { 364 bool IsPauseEvent() const {
364 return (type_ == kBreakpointReached || 365 return (type_ == kBreakpointReached ||
365 type_ == kIsolateInterrupted || 366 type_ == kIsolateInterrupted ||
366 type_ == kExceptionThrown); 367 type_ == kExceptionThrown);
367 } 368 }
(...skipping 27 matching lines...) Expand all
395 396
396 const Object* async_continuation() const { 397 const Object* async_continuation() const {
397 ASSERT(type_ == kBreakpointReached); 398 ASSERT(type_ == kBreakpointReached);
398 return async_continuation_; 399 return async_continuation_;
399 } 400 }
400 void set_async_continuation(const Object* closure) { 401 void set_async_continuation(const Object* closure) {
401 ASSERT(type_ == kBreakpointReached); 402 ASSERT(type_ == kBreakpointReached);
402 async_continuation_ = closure; 403 async_continuation_ = closure;
403 } 404 }
404 405
406 bool at_async_jump() const {
407 return at_async_jump_;
408 }
409 void set_at_async_jump(bool value) {
410 at_async_jump_ = value;
411 }
412
405 Dart_Port isolate_id() const { 413 Dart_Port isolate_id() const {
406 return isolate_->main_port(); 414 return isolate_->main_port();
407 } 415 }
408 416
409 private: 417 private:
410 Isolate* isolate_; 418 Isolate* isolate_;
411 EventType type_; 419 EventType type_;
412 ActivationFrame* top_frame_; 420 ActivationFrame* top_frame_;
413 Breakpoint* breakpoint_; 421 Breakpoint* breakpoint_;
414 const Object* exception_; 422 const Object* exception_;
415 const Object* async_continuation_; 423 const Object* async_continuation_;
424 bool at_async_jump_;
416 }; 425 };
417 426
418 427
419 class Debugger { 428 class Debugger {
420 public: 429 public:
421 typedef void EventHandler(DebuggerEvent* event); 430 typedef void EventHandler(DebuggerEvent* event);
422 431
423 Debugger(); 432 Debugger();
424 ~Debugger(); 433 ~Debugger();
425 434
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 659
651 friend class Isolate; 660 friend class Isolate;
652 friend class BreakpointLocation; 661 friend class BreakpointLocation;
653 DISALLOW_COPY_AND_ASSIGN(Debugger); 662 DISALLOW_COPY_AND_ASSIGN(Debugger);
654 }; 663 };
655 664
656 665
657 } // namespace dart 666 } // namespace dart
658 667
659 #endif // VM_DEBUGGER_H_ 668 #endif // VM_DEBUGGER_H_
OLDNEW
« no previous file with comments | « runtime/observatory/tests/service/test_helper.dart ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698