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

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
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 1899)
+++ runtime/vm/code_generator.cc (working copy)
@@ -469,6 +469,24 @@
}
+// Gets called from debug stub when code reaches a breakpoint.
+DEFINE_RUNTIME_ENTRY(Breakpoint, 0) {
+ ASSERT(arguments.Count() == kBreakpointRuntimeEntry.argument_count());
+ DartFrameIterator iterator;
+ DartFrame* frame = iterator.NextFrame();
+ Function& func = Function::Handle();
+ ASSERT(frame != NULL);
+ printf(">>> Breakpoint at 0x%08x\n", frame->pc());
srdjan 2011/11/29 22:26:00 Why printf instead of OS::Print ? (also below)
hausner 2011/11/30 01:17:05 All the printf calls will go away as the code beco
+ while (frame != NULL) {
+ ASSERT(frame->IsValid());
+ ASSERT(frame->IsDartFrame());
+ func = frame->LookupDartFunction();
+ printf(" 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.

Powered by Google App Engine
This is Rietveld 408576698