Index: runtime/vm/debugger_ia32.cc |
=================================================================== |
--- runtime/vm/debugger_ia32.cc (revision 22595) |
+++ runtime/vm/debugger_ia32.cc (working copy) |
@@ -35,6 +35,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() { |
uint8_t* code = reinterpret_cast<uint8_t*>(pc_ - 5); |
ASSERT((code[0] == 0x89) && (code[1] == 0xEC)); // mov esp,ebp |