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

Unified Diff: runtime/vm/debugger.h

Issue 10537065: Debugger break on TypeError, AssertionError (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | 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 8456)
+++ runtime/vm/debugger.h (working copy)
@@ -165,7 +165,8 @@
// Array of function activations on the call stack.
class DebuggerStackTrace : public ZoneAllocated {
public:
- explicit DebuggerStackTrace(int capacity) : trace_(capacity) { }
+ explicit DebuggerStackTrace(int capacity)
+ : trace_(capacity) { }
intptr_t Length() const { return trace_.length(); }
@@ -189,14 +190,16 @@
class Debugger {
public:
enum EventType {
- kPaused = 1,
+ kBreakpointReached = 1,
kBreakpointResolved = 2,
+ kExceptionThrown = 3,
};
struct DebuggerEvent {
EventType type;
union {
DebuggerStackTrace* stack_trace;
SourceBreakpoint* breakpoint;
+ const Object* exception;
};
};
typedef void EventHandler(DebuggerEvent *event);
@@ -253,6 +256,9 @@
RawObject* GetStaticField(const Class& cls,
const String& field_name);
+ void SignalBpReached();
+ void SignalExceptionThrown(const Object& exc);
+
private:
enum ResumeAction {
kContinue,
@@ -279,12 +285,16 @@
void SyncBreakpoint(SourceBreakpoint* bpt);
+ DebuggerStackTrace* CollectStackTrace();
void SignalBpResolved(SourceBreakpoint *bpt);
bool IsDebuggable(const Function& func);
intptr_t nextId() { return next_id_++; }
+ bool ShouldPauseOnException(DebuggerStackTrace* stack_trace,
+ const Object& exc);
+
Isolate* isolate_;
bool initialized_;
BreakpointHandler* bp_handler_;
@@ -313,6 +323,10 @@
// be run as a side effect of getting values of fields.
bool ignore_breakpoints_;
+ // If true, notify debug client when (unhandled) exception is thrown.
+ bool pause_on_exception_;
+ bool pause_on_unhandled_exception_;
+
friend class SourceBreakpoint;
DISALLOW_COPY_AND_ASSIGN(Debugger);
};
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/debugger.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698