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

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

Issue 1311503004: Remember when an isolate was paused and subtly display it in Obseravatory (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 at_async_jump_(false),
359 timestamp_(-1) {}
359 360
360 Isolate* isolate() const { return isolate_; } 361 Isolate* isolate() const { return isolate_; }
361 362
362 EventType type() const { return type_; } 363 EventType type() const { return type_; }
363 364
364 bool IsPauseEvent() const { 365 bool IsPauseEvent() const {
365 return (type_ == kBreakpointReached || 366 return (type_ == kBreakpointReached ||
366 type_ == kIsolateInterrupted || 367 type_ == kIsolateInterrupted ||
367 type_ == kExceptionThrown); 368 type_ == kExceptionThrown);
368 } 369 }
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 return at_async_jump_; 408 return at_async_jump_;
408 } 409 }
409 void set_at_async_jump(bool value) { 410 void set_at_async_jump(bool value) {
410 at_async_jump_ = value; 411 at_async_jump_ = value;
411 } 412 }
412 413
413 Dart_Port isolate_id() const { 414 Dart_Port isolate_id() const {
414 return isolate_->main_port(); 415 return isolate_->main_port();
415 } 416 }
416 417
418 void UpdateTimestamp();
419
420 int64_t timestamp() const {
421 return timestamp_;
422 }
423
417 private: 424 private:
418 Isolate* isolate_; 425 Isolate* isolate_;
419 EventType type_; 426 EventType type_;
420 ActivationFrame* top_frame_; 427 ActivationFrame* top_frame_;
421 Breakpoint* breakpoint_; 428 Breakpoint* breakpoint_;
422 const Object* exception_; 429 const Object* exception_;
423 const Object* async_continuation_; 430 const Object* async_continuation_;
424 bool at_async_jump_; 431 bool at_async_jump_;
432 int64_t timestamp_;
425 }; 433 };
426 434
427 435
428 class Debugger { 436 class Debugger {
429 public: 437 public:
430 typedef void EventHandler(DebuggerEvent* event); 438 typedef void EventHandler(DebuggerEvent* event);
431 439
432 Debugger(); 440 Debugger();
433 ~Debugger(); 441 ~Debugger();
434 442
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 667
660 friend class Isolate; 668 friend class Isolate;
661 friend class BreakpointLocation; 669 friend class BreakpointLocation;
662 DISALLOW_COPY_AND_ASSIGN(Debugger); 670 DISALLOW_COPY_AND_ASSIGN(Debugger);
663 }; 671 };
664 672
665 673
666 } // namespace dart 674 } // namespace dart
667 675
668 #endif // VM_DEBUGGER_H_ 676 #endif // VM_DEBUGGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698