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

Unified Diff: runtime/vm/debugger.h

Issue 118603002: Keep track of current "pause" event in the debugger. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/debugger.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.h
===================================================================
--- runtime/vm/debugger.h (revision 31235)
+++ runtime/vm/debugger.h (working copy)
@@ -304,6 +304,14 @@
void SetStepOut();
bool IsStepping() const { return resume_action_ != kContinue; }
+ bool IsPaused() const { return pause_event_ != NULL; }
+
+ // Indicates why the debugger is currently paused. If the debugger
+ // is not paused, this returns NULL. Note that the debugger can be
+ // paused for breakpoints, isolate interruption, and (sometimes)
+ // exceptions.
+ const DebuggerEvent* PauseEvent() const { return pause_event_; }
+
void SetExceptionPauseInfo(Dart_ExceptionPauseInfo pause_info);
Dart_ExceptionPauseInfo GetExceptionPauseInfo();
@@ -419,6 +427,10 @@
const String& prefix,
bool include_private_fields);
+ // Handles any events which pause vm execution. Breakpoints,
+ // interrupts, etc.
+ void Pause(DebuggerEvent* event);
+
Isolate* isolate_;
Dart_Port isolate_id_; // A unique ID for the isolate in the debugger.
bool initialized_;
@@ -426,11 +438,7 @@
// ID number generator.
intptr_t next_id_;
- // Current stack trace. Valid while executing breakpoint callback code.
- DebuggerStackTrace* stack_trace_;
- RemoteObjectCache* obj_cache_;
-
SourceBreakpoint* src_breakpoints_;
CodeBreakpoint* code_breakpoints_;
@@ -442,10 +450,18 @@
// be run as a side effect of getting values of fields.
bool ignore_breakpoints_;
- // True while debugger calls event_handler_. Used to prevent recursive
- // debugger events.
- bool in_event_notification_;
+ // Indicates why the debugger is currently paused. If the debugger
+ // is not paused, this is NULL. Note that the debugger can be
+ // paused for breakpoints, isolate interruption, and (sometimes)
+ // exceptions.
+ DebuggerEvent* pause_event_;
+ // An id -> object map. Valid only while IsPaused().
+ RemoteObjectCache* obj_cache_;
+
+ // Current stack trace. Valid only while IsPaused().
+ DebuggerStackTrace* stack_trace_;
+
Dart_ExceptionPauseInfo exc_pause_info_;
static EventHandler* event_handler_;
« no previous file with comments | « no previous file | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698