diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc index 004848ff4d..501666f0a9 100644 --- a/src/runtime/runtime-debug.cc +++ b/src/runtime/runtime-debug.cc @@ -1240,6 +1240,18 @@ RUNTIME_FUNCTION(Runtime_PrepareStep) { return isolate->heap()->undefined_value(); } +RUNTIME_FUNCTION(Runtime_PrepareStepFrame) { + HandleScope scope(isolate); + DCHECK_EQ(0, args.length()); + CHECK(isolate->debug()->CheckExecutionState()); + + // Clear all current stepping setup. + isolate->debug()->ClearStepping(); + + // Prepare step. + isolate->debug()->PrepareStep(StepFrame); + return isolate->heap()->undefined_value(); +} // Clear all stepping set by PrepareStep. RUNTIME_FUNCTION(Runtime_ClearStepping) { diff --git a/src/runtime/runtime.h b/src/runtime/runtime.h index 730cd2bd4b..b5f4a4a668 100644 --- a/src/runtime/runtime.h +++ b/src/runtime/runtime.h @@ -169,6 +169,7 @@ namespace internal { F(ChangeBreakOnException, 2, 1) \ F(IsBreakOnException, 1, 1) \ F(PrepareStep, 2, 1) \ + F(PrepareStepFrame, 0, 1) \ F(ClearStepping, 0, 1) \ F(DebugEvaluate, 6, 1) \ F(DebugEvaluateGlobal, 4, 1) \ diff --git a/test/mjsunit/debug-stepframe-clearing.js b/test/debugger/debug/debug-stepframe-clearing.js similarity index 98% rename from test/mjsunit/debug-stepframe-clearing.js rename to test/debugger/debug/debug-stepframe-clearing.js index dec46fd7d6..8718636d9c 100644 --- a/test/mjsunit/debug-stepframe-clearing.js +++ b/test/debugger/debug/debug-stepframe-clearing.js @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --expose-debug-as debug // This test ensures that IC learning doesn't interfere with stepping into // property accessor. f1()'s ICs are allowed to learn to a monomorphic state, diff --git a/test/mjsunit/debug-stepframe.js b/test/debugger/debug/debug-stepframe.js similarity index 98% rename from test/mjsunit/debug-stepframe.js rename to test/debugger/debug/debug-stepframe.js index 8d9f959e78..cb1675994a 100644 --- a/test/mjsunit/debug-stepframe.js +++ b/test/debugger/debug/debug-stepframe.js @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --expose-debug-as debug function f0() { var v00 = 0; // Break 1 diff --git a/test/debugger/test-api.js b/test/debugger/test-api.js index 069f81796d..55111abdf8 100644 --- a/test/debugger/test-api.js +++ b/test/debugger/test-api.js @@ -378,6 +378,7 @@ class DebugWrapper { case this.StepAction.StepOut: this.stepOut(); break; case this.StepAction.StepNext: this.stepOver(); break; case this.StepAction.StepIn: this.stepInto(); break; + case this.StepAction.StepFrame: %PrepareStepFrame(); break; default: %AbortJS("Unsupported StepAction"); break; } }