[debug-wrapper] Implement StepFrame through runtime

StepFrame is a combination of StepIn/StepOut, e.g. it breaks to the next
frame change. This is not part of the public API, but we want to keep it
for internal tests.

BUG=v8:5530

Review-Url: https://codereview.chromium.org/2514303003
Cr-Commit-Position: refs/heads/master@{#41177}
This commit is contained in:
jgruber 2016-11-22 05:14:31 -08:00 committed by Commit bot
parent 2ba24a71b6
commit a0e9160066
5 changed files with 14 additions and 2 deletions

View File

@ -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) {

View File

@ -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) \

View File

@ -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,

View File

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

View File

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