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

Unified Diff: runtime/vm/debugger.cc

Issue 15359010: Make VM debugger stop at every safe point (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/debugger.h ('k') | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger.cc
===================================================================
--- runtime/vm/debugger.cc (revision 22971)
+++ runtime/vm/debugger.cc (working copy)
@@ -779,7 +779,6 @@
src_breakpoints_(NULL),
code_breakpoints_(NULL),
resume_action_(kContinue),
- last_bpt_line_(-1),
ignore_breakpoints_(false),
exc_pause_info_(kNoPauseOnExceptions) {
}
@@ -1024,8 +1023,6 @@
if (!ShouldPauseOnException(stack_trace, exc)) {
return;
}
- // No single-stepping possible after this pause event.
- last_bpt_line_ = -1;
ASSERT(stack_trace_ == NULL);
stack_trace_ = stack_trace;
ASSERT(obj_cache_ == NULL);
@@ -1532,33 +1529,21 @@
top_frame->pc());
}
- if (!bpt->IsInternal()) {
- // This is a user-defined breakpoint so we call the breakpoint
- // callback even if it is on the same line as the previous breakpoint.
- last_bpt_line_ = -1;
+ resume_action_ = kContinue;
+ if (event_handler_ != NULL) {
+ ASSERT(stack_trace_ == NULL);
+ ASSERT(obj_cache_ == NULL);
+ obj_cache_ = new RemoteObjectCache(64);
+ stack_trace_ = stack_trace;
+ DebuggerEvent event;
+ event.type = kBreakpointReached;
+ ASSERT(stack_trace->Length() > 0);
+ event.top_frame = stack_trace->ActivationFrameAt(0);
+ (*event_handler_)(&event);
+ stack_trace_ = NULL;
+ obj_cache_ = NULL; // Remote object cache is zone allocated.
}
- bool notify_frontend =
- (last_bpt_line_ < 0) || (last_bpt_line_ != bpt->LineNumber());
-
- if (notify_frontend) {
- resume_action_ = kContinue;
- if (event_handler_ != NULL) {
- ASSERT(stack_trace_ == NULL);
- ASSERT(obj_cache_ == NULL);
- obj_cache_ = new RemoteObjectCache(64);
- stack_trace_ = stack_trace;
- DebuggerEvent event;
- event.type = kBreakpointReached;
- ASSERT(stack_trace->Length() > 0);
- event.top_frame = stack_trace->ActivationFrameAt(0);
- (*event_handler_)(&event);
- stack_trace_ = NULL;
- obj_cache_ = NULL; // Remote object cache is zone allocated.
- last_bpt_line_ = bpt->LineNumber();
- }
- }
-
Function& currently_instrumented_func = Function::Handle();
if (bpt->IsInternal()) {
currently_instrumented_func = bpt->function();
@@ -1656,7 +1641,6 @@
if (func_to_instrument.IsNull() ||
(func_to_instrument.raw() != currently_instrumented_func.raw())) {
- last_bpt_line_ = -1;
RemoveInternalBreakpoints(); // *bpt is now invalid.
if (!func_to_instrument.IsNull()) {
InstrumentForStepping(func_to_instrument);
« no previous file with comments | « runtime/vm/debugger.h ('k') | runtime/vm/debugger_api_impl_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698