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

Unified Diff: runtime/vm/code_generator.cc

Issue 8687037: Very first steps for a debugger (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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.h ('k') | runtime/vm/code_patcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 1927)
+++ runtime/vm/code_generator.cc (working copy)
@@ -469,6 +469,24 @@
}
+// Gets called from debug stub when code reaches a breakpoint.
+DEFINE_RUNTIME_ENTRY(BreakpointHandler, 0) {
+ ASSERT(arguments.Count() == kBreakpointHandlerRuntimeEntry.argument_count());
+ DartFrameIterator iterator;
+ DartFrame* frame = iterator.NextFrame();
+ Function& func = Function::Handle();
+ ASSERT(frame != NULL);
+ OS::Print(">>> Breakpoint at 0x%08x\n", frame->pc());
+ while (frame != NULL) {
+ ASSERT(frame->IsValid());
+ ASSERT(frame->IsDartFrame());
+ func = frame->LookupDartFunction();
+ OS::Print(" func %s\n", String::Handle(func.name()).ToCString());
+ frame = iterator.NextFrame();
+ }
+}
+
+
// Handles inline cache misses by updating the IC data array of the call
// site.
// Arg0: Receiver object.
« no previous file with comments | « runtime/vm/code_generator.h ('k') | runtime/vm/code_patcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698