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

Unified Diff: runtime/vm/debugger.cc

Issue 14664006: Instrument debugger to track down stack trace problems (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 | « no previous file | no next file » | 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 22196)
+++ runtime/vm/debugger.cc (working copy)
@@ -367,7 +367,6 @@
return reinterpret_cast<RawContext*>(GetLocalVarValue(var_info.index));
}
}
- UNREACHABLE();
return Context::null();
}
@@ -917,6 +916,21 @@
stack_trace->ActivationFrameAt(stack_trace->Length() - 1);
if (callee_frame->function().IsClosureFunction()) {
ctx = activation->GetSavedCurrentContext();
+ if (FLAG_verbose_debug && ctx.IsNull()) {
+ const Function& caller = activation->function();
+ const Function& callee = callee_frame->function();
+ const Script& script =
+ Script::Handle(Class::Handle(caller.Owner()).script());
+ intptr_t line, col;
+ script.GetTokenLocation(activation->TokenPos(), &line, &col);
+ printf("CollectStackTrace error: no saved context in function "
+ "'%s' which calls closure '%s' "
+ " in line %"Pd" column %"Pd"\n",
+ caller.ToFullyQualifiedCString(),
+ callee.ToFullyQualifiedCString(),
+ line, col);
+ }
+ ASSERT(!ctx.IsNull());
}
}
if (optimized_frame_found || code.is_optimized()) {
@@ -1670,7 +1684,6 @@
// Remove and delete the source breakpoint bpt and its associated
// code breakpoints.
void Debugger::RemoveBreakpoint(intptr_t bp_id) {
- ASSERT(src_breakpoints_ != NULL);
SourceBreakpoint* prev_bpt = NULL;
SourceBreakpoint* curr_bpt = src_breakpoints_;
while (curr_bpt != NULL) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698