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} |