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

Unified Diff: runtime/vm/debugger_arm.cc

Issue 14858033: Implement breakpoint for closure calls (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.cc ('k') | runtime/vm/debugger_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/debugger_arm.cc
===================================================================
--- runtime/vm/debugger_arm.cc (revision 22595)
+++ runtime/vm/debugger_arm.cc (working copy)
@@ -30,6 +30,16 @@
}
+RawObject* ActivationFrame::GetClosureObject(intptr_t num_actual_args) {
+ // At a minimum we have the closure object on the stack.
+ ASSERT(num_actual_args > 0);
+ // Stack pointer points to last argument that was pushed on the stack.
+ uword closure_addr = sp() + ((num_actual_args - 1) * kWordSize);
+ return reinterpret_cast<RawObject*>(
+ *reinterpret_cast<uword*>(closure_addr));
+}
+
+
void CodeBreakpoint::PatchFunctionReturn() {
uword* code = reinterpret_cast<uword*>(pc_ - 3 * Instr::kInstrSize);
ASSERT(code[0] == 0xe8bd4c00); // ldmia sp!, {pp, fp, lr}
« no previous file with comments | « runtime/vm/debugger.cc ('k') | runtime/vm/debugger_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698