Commit 3740764c authored by Benedikt Meurer's avatar Benedikt Meurer Committed by V8 LUCI CQ

[debug][cleanup] Use consistent StepInto and StepOver naming.

In the Chrome DevTools Protocol, the step actions are named StepOut,
StepOver, and StepInto, but internally we used StepOut, StepNext, and
StepIn instead. This change adjusts the naming to be consistent.

Bug: chromium:901814, chromium:1162229
Change-Id: Id3502a1b0a4aadd94734ec3d1fef73c1782fa220
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2928510Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74877}
parent c69b0c80
...@@ -107,8 +107,8 @@ void SetBreakPointsActive(Isolate* isolate, bool is_active); ...@@ -107,8 +107,8 @@ void SetBreakPointsActive(Isolate* isolate, bool is_active);
enum StepAction { enum StepAction {
StepOut = 0, // Step out of the current function. StepOut = 0, // Step out of the current function.
StepNext = 1, // Step to the next statement in the current function. StepOver = 1, // Step to the next statement in the current function.
StepIn = 2 // Step into new functions invoked or the next statement StepInto = 2 // Step into new functions invoked or the next statement
// in the current function. // in the current function.
}; };
......
...@@ -500,16 +500,17 @@ void Debug::Break(JavaScriptFrame* frame, Handle<JSFunction> break_target) { ...@@ -500,16 +500,17 @@ void Debug::Break(JavaScriptFrame* frame, Handle<JSFunction> break_target) {
case StepNone: case StepNone:
return; return;
case StepOut: case StepOut:
// Step out should not break in a deeper frame than target frame. // StepOut should not break in a deeper frame than target frame.
if (current_frame_count > target_frame_count) return; if (current_frame_count > target_frame_count) return;
step_break = true; step_break = true;
break; break;
case StepNext: case StepOver:
// Step next should not break in a deeper frame than target frame. // StepOver should not break in a deeper frame than target frame.
if (current_frame_count > target_frame_count) return; if (current_frame_count > target_frame_count) return;
V8_FALLTHROUGH; V8_FALLTHROUGH;
case StepIn: { case StepInto: {
// Special case "next" and "in" for generators that are about to suspend. // Special case StepInto and StepOver for generators that are about to
// suspend.
if (location.IsSuspend()) { if (location.IsSuspend()) {
DCHECK(!has_suspended_generator()); DCHECK(!has_suspended_generator());
thread_local_.suspended_generator_ = thread_local_.suspended_generator_ =
...@@ -924,7 +925,7 @@ void Debug::ClearBreakOnNextFunctionCall() { ...@@ -924,7 +925,7 @@ void Debug::ClearBreakOnNextFunctionCall() {
} }
void Debug::PrepareStepIn(Handle<JSFunction> function) { void Debug::PrepareStepIn(Handle<JSFunction> function) {
CHECK(last_step_action() >= StepIn || break_on_next_function_call()); CHECK(last_step_action() >= StepInto || break_on_next_function_call());
if (ignore_events()) return; if (ignore_events()) return;
if (in_debug_scope()) return; if (in_debug_scope()) return;
if (break_disabled()) return; if (break_disabled()) return;
...@@ -940,7 +941,7 @@ void Debug::PrepareStepInSuspendedGenerator() { ...@@ -940,7 +941,7 @@ void Debug::PrepareStepInSuspendedGenerator() {
if (ignore_events()) return; if (ignore_events()) return;
if (in_debug_scope()) return; if (in_debug_scope()) return;
if (break_disabled()) return; if (break_disabled()) return;
thread_local_.last_step_action_ = StepIn; thread_local_.last_step_action_ = StepInto;
UpdateHookOnFunctionCall(); UpdateHookOnFunctionCall();
Handle<JSFunction> function( Handle<JSFunction> function(
JSGeneratorObject::cast(thread_local_.suspended_generator_).function(), JSGeneratorObject::cast(thread_local_.suspended_generator_).function(),
...@@ -978,7 +979,7 @@ void Debug::PrepareStepOnThrow() { ...@@ -978,7 +979,7 @@ void Debug::PrepareStepOnThrow() {
// Then skip to the frame we want to break in, then instrument for stepping. // Then skip to the frame we want to break in, then instrument for stepping.
for (; !it.done(); it.Advance()) { for (; !it.done(); it.Advance()) {
JavaScriptFrame* frame = JavaScriptFrame::cast(it.frame()); JavaScriptFrame* frame = JavaScriptFrame::cast(it.frame());
if (last_step_action() == StepIn) { if (last_step_action() == StepInto) {
// Deoptimize frame to ensure calls are checked for step-in. // Deoptimize frame to ensure calls are checked for step-in.
Deoptimizer::DeoptimizeFunction(frame->function()); Deoptimizer::DeoptimizeFunction(frame->function());
} }
...@@ -1006,7 +1007,7 @@ void Debug::PrepareStepOnThrow() { ...@@ -1006,7 +1007,7 @@ void Debug::PrepareStepOnThrow() {
if (found_handler) { if (found_handler) {
// We found the handler. If we are stepping next or out, we need to // We found the handler. If we are stepping next or out, we need to
// iterate until we found the suitable target frame to break in. // iterate until we found the suitable target frame to break in.
if ((last_step_action() == StepNext || last_step_action() == StepOut) && if ((last_step_action() == StepOver || last_step_action() == StepOut) &&
current_frame_count > thread_local_.target_frame_count_) { current_frame_count > thread_local_.target_frame_count_) {
continue; continue;
} }
...@@ -1071,14 +1072,14 @@ void Debug::PrepareStep(StepAction step_action) { ...@@ -1071,14 +1072,14 @@ void Debug::PrepareStep(StepAction step_action) {
thread_local_.ignore_step_into_function_ = *function; thread_local_.ignore_step_into_function_ = *function;
} }
step_action = StepOut; step_action = StepOut;
thread_local_.last_step_action_ = StepIn; thread_local_.last_step_action_ = StepInto;
} }
// We need to schedule DebugOnFunction call callback // We need to schedule DebugOnFunction call callback
UpdateHookOnFunctionCall(); UpdateHookOnFunctionCall();
// A step-next in blackboxed function is a step-out. // A step-next in blackboxed function is a step-out.
if (step_action == StepNext && IsBlackboxed(shared)) step_action = StepOut; if (step_action == StepOver && IsBlackboxed(shared)) step_action = StepOut;
thread_local_.last_statement_position_ = thread_local_.last_statement_position_ =
summary.abstract_code()->SourceStatementPosition(summary.code_offset()); summary.abstract_code()->SourceStatementPosition(summary.code_offset());
...@@ -1136,7 +1137,7 @@ void Debug::PrepareStep(StepAction step_action) { ...@@ -1136,7 +1137,7 @@ void Debug::PrepareStep(StepAction step_action) {
} }
#endif // V8_ENABLE_WEBASSEMBLY #endif // V8_ENABLE_WEBASSEMBLY
JavaScriptFrame* frame = JavaScriptFrame::cast(frames_it.frame()); JavaScriptFrame* frame = JavaScriptFrame::cast(frames_it.frame());
if (last_step_action() == StepIn) { if (last_step_action() == StepInto) {
// Deoptimize frame to ensure calls are checked for step-in. // Deoptimize frame to ensure calls are checked for step-in.
Deoptimizer::DeoptimizeFunction(frame->function()); Deoptimizer::DeoptimizeFunction(frame->function());
} }
...@@ -1159,10 +1160,10 @@ void Debug::PrepareStep(StepAction step_action) { ...@@ -1159,10 +1160,10 @@ void Debug::PrepareStep(StepAction step_action) {
} }
break; break;
} }
case StepNext: case StepOver:
thread_local_.target_frame_count_ = current_frame_count; thread_local_.target_frame_count_ = current_frame_count;
V8_FALLTHROUGH; V8_FALLTHROUGH;
case StepIn: case StepInto:
FloodWithOneShot(shared); FloodWithOneShot(shared);
break; break;
} }
...@@ -2034,8 +2035,8 @@ void Debug::OnDebugBreak(Handle<FixedArray> break_points_hit, ...@@ -2034,8 +2035,8 @@ void Debug::OnDebugBreak(Handle<FixedArray> break_points_hit,
HandleScope scope(isolate_); HandleScope scope(isolate_);
DisableBreak no_recursive_break(this); DisableBreak no_recursive_break(this);
if ((lastStepAction == StepAction::StepNext || if ((lastStepAction == StepAction::StepOver ||
lastStepAction == StepAction::StepIn) && lastStepAction == StepAction::StepInto) &&
ShouldBeSkipped()) { ShouldBeSkipped()) {
PrepareStep(lastStepAction); PrepareStep(lastStepAction);
return; return;
...@@ -2216,9 +2217,9 @@ void Debug::UpdateState() { ...@@ -2216,9 +2217,9 @@ void Debug::UpdateState() {
} }
void Debug::UpdateHookOnFunctionCall() { void Debug::UpdateHookOnFunctionCall() {
STATIC_ASSERT(LastStepAction == StepIn); STATIC_ASSERT(LastStepAction == StepInto);
hook_on_function_call_ = hook_on_function_call_ =
thread_local_.last_step_action_ == StepIn || thread_local_.last_step_action_ == StepInto ||
isolate_->debug_execution_mode() == DebugInfo::kSideEffects || isolate_->debug_execution_mode() == DebugInfo::kSideEffects ||
thread_local_.break_on_next_function_call_; thread_local_.break_on_next_function_call_;
} }
......
...@@ -28,14 +28,14 @@ class JavaScriptFrame; ...@@ -28,14 +28,14 @@ class JavaScriptFrame;
class JSGeneratorObject; class JSGeneratorObject;
class StackFrame; class StackFrame;
// Step actions. NOTE: These values are in macros.py as well. // Step actions.
enum StepAction : int8_t { enum StepAction : int8_t {
StepNone = -1, // Stepping not prepared. StepNone = -1, // Stepping not prepared.
StepOut = 0, // Step out of the current function. StepOut = 0, // Step out of the current function.
StepNext = 1, // Step to the next statement in the current function. StepOver = 1, // Step to the next statement in the current function.
StepIn = 2, // Step into new functions invoked or the next statement StepInto = 2, // Step into new functions invoked or the next statement
// in the current function. // in the current function.
LastStepAction = StepIn LastStepAction = StepInto
}; };
// Type of exception break. NOTE: These values are in macros.py as well. // Type of exception break. NOTE: These values are in macros.py as well.
......
...@@ -372,7 +372,7 @@ void WasmModuleDebug::PrepareStep() { ...@@ -372,7 +372,7 @@ void WasmModuleDebug::PrepareStep() {
i::Isolate* isolate = GetIsolate(); i::Isolate* isolate = GetIsolate();
DebugScope debug_scope(isolate->debug()); DebugScope debug_scope(isolate->debug());
debug::PrepareStep(reinterpret_cast<v8::Isolate*>(isolate), debug::PrepareStep(reinterpret_cast<v8::Isolate*>(isolate),
debug::StepAction::StepIn); debug::StepAction::StepInto);
} }
template <typename T> template <typename T>
......
...@@ -247,7 +247,7 @@ void V8Debugger::stepIntoStatement(int targetContextGroupId, ...@@ -247,7 +247,7 @@ void V8Debugger::stepIntoStatement(int targetContextGroupId,
if (asyncStepOutOfFunction(targetContextGroupId, true)) return; if (asyncStepOutOfFunction(targetContextGroupId, true)) return;
m_targetContextGroupId = targetContextGroupId; m_targetContextGroupId = targetContextGroupId;
m_pauseOnAsyncCall = breakOnAsyncCall; m_pauseOnAsyncCall = breakOnAsyncCall;
v8::debug::PrepareStep(m_isolate, v8::debug::StepIn); v8::debug::PrepareStep(m_isolate, v8::debug::StepInto);
continueProgram(targetContextGroupId); continueProgram(targetContextGroupId);
} }
...@@ -256,7 +256,7 @@ void V8Debugger::stepOverStatement(int targetContextGroupId) { ...@@ -256,7 +256,7 @@ void V8Debugger::stepOverStatement(int targetContextGroupId) {
DCHECK(targetContextGroupId); DCHECK(targetContextGroupId);
if (asyncStepOutOfFunction(targetContextGroupId, true)) return; if (asyncStepOutOfFunction(targetContextGroupId, true)) return;
m_targetContextGroupId = targetContextGroupId; m_targetContextGroupId = targetContextGroupId;
v8::debug::PrepareStep(m_isolate, v8::debug::StepNext); v8::debug::PrepareStep(m_isolate, v8::debug::StepOver);
continueProgram(targetContextGroupId); continueProgram(targetContextGroupId);
} }
......
...@@ -681,7 +681,7 @@ RUNTIME_FUNCTION(Runtime_DebugOnFunctionCall) { ...@@ -681,7 +681,7 @@ RUNTIME_FUNCTION(Runtime_DebugOnFunctionCall) {
if (isolate->debug()->needs_check_on_function_call()) { if (isolate->debug()->needs_check_on_function_call()) {
// Ensure that the callee will perform debug check on function call too. // Ensure that the callee will perform debug check on function call too.
Deoptimizer::DeoptimizeFunction(*fun); Deoptimizer::DeoptimizeFunction(*fun);
if (isolate->debug()->last_step_action() >= StepIn || if (isolate->debug()->last_step_action() >= StepInto ||
isolate->debug()->break_on_next_function_call()) { isolate->debug()->break_on_next_function_call()) {
DCHECK_EQ(isolate->debug_execution_mode(), DebugInfo::kBreakpoints); DCHECK_EQ(isolate->debug_execution_mode(), DebugInfo::kBreakpoints);
isolate->debug()->PrepareStepIn(fun); isolate->debug()->PrepareStepIn(fun);
......
...@@ -440,7 +440,7 @@ class DebugInfoImpl { ...@@ -440,7 +440,7 @@ class DebugInfoImpl {
bool IsStepping(WasmFrame* frame) { bool IsStepping(WasmFrame* frame) {
Isolate* isolate = frame->wasm_instance().GetIsolate(); Isolate* isolate = frame->wasm_instance().GetIsolate();
if (isolate->debug()->last_step_action() == StepIn) return true; if (isolate->debug()->last_step_action() == StepInto) return true;
base::MutexGuard guard(&mutex_); base::MutexGuard guard(&mutex_);
auto it = per_isolate_data_.find(isolate); auto it = per_isolate_data_.find(isolate);
return it != per_isolate_data_.end() && return it != per_isolate_data_.end() &&
......
...@@ -42,10 +42,10 @@ ...@@ -42,10 +42,10 @@
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
using ::v8::internal::Handle; using ::v8::internal::Handle;
using ::v8::internal::StepInto; // From StepAction enum
using ::v8::internal::StepNone; // From StepAction enum using ::v8::internal::StepNone; // From StepAction enum
using ::v8::internal::StepIn; // From StepAction enum using ::v8::internal::StepOut; // From StepAction enum
using ::v8::internal::StepNext; // From StepAction enum using ::v8::internal::StepOver; // From StepAction enum
using ::v8::internal::StepOut; // From StepAction enum
// --- H e l p e r F u n c t i o n s // --- H e l p e r F u n c t i o n s
...@@ -1873,7 +1873,7 @@ TEST(DebugStepLinear) { ...@@ -1873,7 +1873,7 @@ TEST(DebugStepLinear) {
SetBreakPoint(foo, 3); SetBreakPoint(foo, 3);
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Context> context = env.local(); v8::Local<v8::Context> context = env.local();
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
...@@ -1940,7 +1940,7 @@ TEST(DebugStepKeyedLoadLoop) { ...@@ -1940,7 +1940,7 @@ TEST(DebugStepKeyedLoadLoop) {
// Set up break point and step through the function. // Set up break point and step through the function.
SetBreakPoint(foo, 3); SetBreakPoint(foo, 3);
run_step.set_step_action(StepNext); run_step.set_step_action(StepOver);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), kArgc, args).ToLocalChecked(); foo->Call(context, env->Global(), kArgc, args).ToLocalChecked();
...@@ -1991,7 +1991,7 @@ TEST(DebugStepKeyedStoreLoop) { ...@@ -1991,7 +1991,7 @@ TEST(DebugStepKeyedStoreLoop) {
// Set up break point and step through the function. // Set up break point and step through the function.
SetBreakPoint(foo, 3); SetBreakPoint(foo, 3);
run_step.set_step_action(StepNext); run_step.set_step_action(StepOver);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), kArgc, args).ToLocalChecked(); foo->Call(context, env->Global(), kArgc, args).ToLocalChecked();
...@@ -2037,7 +2037,7 @@ TEST(DebugStepNamedLoadLoop) { ...@@ -2037,7 +2037,7 @@ TEST(DebugStepNamedLoadLoop) {
// Set up break point and step through the function. // Set up break point and step through the function.
SetBreakPoint(foo, 4); SetBreakPoint(foo, 4);
run_step.set_step_action(StepNext); run_step.set_step_action(StepOver);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
...@@ -2074,7 +2074,7 @@ static void DoDebugStepNamedStoreLoop(int expected) { ...@@ -2074,7 +2074,7 @@ static void DoDebugStepNamedStoreLoop(int expected) {
// Set up break point and step through the function. // Set up break point and step through the function.
SetBreakPoint(foo, 3); SetBreakPoint(foo, 3);
run_step.set_step_action(StepNext); run_step.set_step_action(StepOver);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
...@@ -2113,7 +2113,7 @@ TEST(DebugStepLinearMixedICs) { ...@@ -2113,7 +2113,7 @@ TEST(DebugStepLinearMixedICs) {
SetBreakPoint(foo, 0); SetBreakPoint(foo, 0);
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
...@@ -2163,7 +2163,7 @@ TEST(DebugStepDeclarations) { ...@@ -2163,7 +2163,7 @@ TEST(DebugStepDeclarations) {
SetBreakPoint(foo, 0); SetBreakPoint(foo, 0);
// Stepping through the declarations. // Stepping through the declarations.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
CHECK_EQ(5, break_point_hit_count); CHECK_EQ(5, break_point_hit_count);
...@@ -2198,7 +2198,7 @@ TEST(DebugStepLocals) { ...@@ -2198,7 +2198,7 @@ TEST(DebugStepLocals) {
SetBreakPoint(foo, 0); SetBreakPoint(foo, 0);
// Stepping through the declarations. // Stepping through the declarations.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
CHECK_EQ(5, break_point_hit_count); CHECK_EQ(5, break_point_hit_count);
...@@ -2236,14 +2236,14 @@ TEST(DebugStepIf) { ...@@ -2236,14 +2236,14 @@ TEST(DebugStepIf) {
SetBreakPoint(foo, 0); SetBreakPoint(foo, 0);
// Stepping through the true part. // Stepping through the true part.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_true[argc] = {v8::True(isolate)}; v8::Local<v8::Value> argv_true[argc] = {v8::True(isolate)};
foo->Call(context, env->Global(), argc, argv_true).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_true).ToLocalChecked();
CHECK_EQ(4, break_point_hit_count); CHECK_EQ(4, break_point_hit_count);
// Stepping through the false part. // Stepping through the false part.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_false[argc] = {v8::False(isolate)}; v8::Local<v8::Value> argv_false[argc] = {v8::False(isolate)};
foo->Call(context, env->Global(), argc, argv_false).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_false).ToLocalChecked();
...@@ -2288,21 +2288,21 @@ TEST(DebugStepSwitch) { ...@@ -2288,21 +2288,21 @@ TEST(DebugStepSwitch) {
SetBreakPoint(foo, 0); SetBreakPoint(foo, 0);
// One case with fall-through. // One case with fall-through.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_1[argc] = {v8::Number::New(isolate, 1)}; v8::Local<v8::Value> argv_1[argc] = {v8::Number::New(isolate, 1)};
foo->Call(context, env->Global(), argc, argv_1).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_1).ToLocalChecked();
CHECK_EQ(6, break_point_hit_count); CHECK_EQ(6, break_point_hit_count);
// Another case. // Another case.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_2[argc] = {v8::Number::New(isolate, 2)}; v8::Local<v8::Value> argv_2[argc] = {v8::Number::New(isolate, 2)};
foo->Call(context, env->Global(), argc, argv_2).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_2).ToLocalChecked();
CHECK_EQ(5, break_point_hit_count); CHECK_EQ(5, break_point_hit_count);
// Last case. // Last case.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_3[argc] = {v8::Number::New(isolate, 3)}; v8::Local<v8::Value> argv_3[argc] = {v8::Number::New(isolate, 3)};
foo->Call(context, env->Global(), argc, argv_3).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_3).ToLocalChecked();
...@@ -2338,21 +2338,21 @@ TEST(DebugStepWhile) { ...@@ -2338,21 +2338,21 @@ TEST(DebugStepWhile) {
SetBreakPoint(foo, 8); // "var a = 0;" SetBreakPoint(foo, 8); // "var a = 0;"
// Looping 0 times. We still should break at the while-condition once. // Looping 0 times. We still should break at the while-condition once.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_0[argc] = {v8::Number::New(isolate, 0)}; v8::Local<v8::Value> argv_0[argc] = {v8::Number::New(isolate, 0)};
foo->Call(context, env->Global(), argc, argv_0).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_0).ToLocalChecked();
CHECK_EQ(3, break_point_hit_count); CHECK_EQ(3, break_point_hit_count);
// Looping 10 times. // Looping 10 times.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_10[argc] = {v8::Number::New(isolate, 10)}; v8::Local<v8::Value> argv_10[argc] = {v8::Number::New(isolate, 10)};
foo->Call(context, env->Global(), argc, argv_10).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_10).ToLocalChecked();
CHECK_EQ(23, break_point_hit_count); CHECK_EQ(23, break_point_hit_count);
// Looping 100 times. // Looping 100 times.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_100[argc] = {v8::Number::New(isolate, 100)}; v8::Local<v8::Value> argv_100[argc] = {v8::Number::New(isolate, 100)};
foo->Call(context, env->Global(), argc, argv_100).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_100).ToLocalChecked();
...@@ -2388,21 +2388,21 @@ TEST(DebugStepDoWhile) { ...@@ -2388,21 +2388,21 @@ TEST(DebugStepDoWhile) {
SetBreakPoint(foo, 8); // "var a = 0;" SetBreakPoint(foo, 8); // "var a = 0;"
// Looping 0 times. // Looping 0 times.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_0[argc] = {v8::Number::New(isolate, 0)}; v8::Local<v8::Value> argv_0[argc] = {v8::Number::New(isolate, 0)};
foo->Call(context, env->Global(), argc, argv_0).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_0).ToLocalChecked();
CHECK_EQ(4, break_point_hit_count); CHECK_EQ(4, break_point_hit_count);
// Looping 10 times. // Looping 10 times.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_10[argc] = {v8::Number::New(isolate, 10)}; v8::Local<v8::Value> argv_10[argc] = {v8::Number::New(isolate, 10)};
foo->Call(context, env->Global(), argc, argv_10).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_10).ToLocalChecked();
CHECK_EQ(22, break_point_hit_count); CHECK_EQ(22, break_point_hit_count);
// Looping 100 times. // Looping 100 times.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_100[argc] = {v8::Number::New(isolate, 100)}; v8::Local<v8::Value> argv_100[argc] = {v8::Number::New(isolate, 100)};
foo->Call(context, env->Global(), argc, argv_100).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_100).ToLocalChecked();
...@@ -2439,21 +2439,21 @@ TEST(DebugStepFor) { ...@@ -2439,21 +2439,21 @@ TEST(DebugStepFor) {
SetBreakPoint(foo, 8); // "a = 1;" SetBreakPoint(foo, 8); // "a = 1;"
// Looping 0 times. // Looping 0 times.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_0[argc] = {v8::Number::New(isolate, 0)}; v8::Local<v8::Value> argv_0[argc] = {v8::Number::New(isolate, 0)};
foo->Call(context, env->Global(), argc, argv_0).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_0).ToLocalChecked();
CHECK_EQ(4, break_point_hit_count); CHECK_EQ(4, break_point_hit_count);
// Looping 10 times. // Looping 10 times.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_10[argc] = {v8::Number::New(isolate, 10)}; v8::Local<v8::Value> argv_10[argc] = {v8::Number::New(isolate, 10)};
foo->Call(context, env->Global(), argc, argv_10).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_10).ToLocalChecked();
CHECK_EQ(34, break_point_hit_count); CHECK_EQ(34, break_point_hit_count);
// Looping 100 times. // Looping 100 times.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_100[argc] = {v8::Number::New(isolate, 100)}; v8::Local<v8::Value> argv_100[argc] = {v8::Number::New(isolate, 100)};
foo->Call(context, env->Global(), argc, argv_100).ToLocalChecked(); foo->Call(context, env->Global(), argc, argv_100).ToLocalChecked();
...@@ -2498,7 +2498,7 @@ TEST(DebugStepForContinue) { ...@@ -2498,7 +2498,7 @@ TEST(DebugStepForContinue) {
// Each loop generates 4 or 5 steps depending on whether a is equal. // Each loop generates 4 or 5 steps depending on whether a is equal.
// Looping 10 times. // Looping 10 times.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_10[argc] = {v8::Number::New(isolate, 10)}; v8::Local<v8::Value> argv_10[argc] = {v8::Number::New(isolate, 10)};
result = foo->Call(context, env->Global(), argc, argv_10).ToLocalChecked(); result = foo->Call(context, env->Global(), argc, argv_10).ToLocalChecked();
...@@ -2506,7 +2506,7 @@ TEST(DebugStepForContinue) { ...@@ -2506,7 +2506,7 @@ TEST(DebugStepForContinue) {
CHECK_EQ(62, break_point_hit_count); CHECK_EQ(62, break_point_hit_count);
// Looping 100 times. // Looping 100 times.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_100[argc] = {v8::Number::New(isolate, 100)}; v8::Local<v8::Value> argv_100[argc] = {v8::Number::New(isolate, 100)};
result = foo->Call(context, env->Global(), argc, argv_100).ToLocalChecked(); result = foo->Call(context, env->Global(), argc, argv_100).ToLocalChecked();
...@@ -2553,7 +2553,7 @@ TEST(DebugStepForBreak) { ...@@ -2553,7 +2553,7 @@ TEST(DebugStepForBreak) {
// which only generates 4. // which only generates 4.
// Looping 10 times. // Looping 10 times.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_10[argc] = {v8::Number::New(isolate, 10)}; v8::Local<v8::Value> argv_10[argc] = {v8::Number::New(isolate, 10)};
result = foo->Call(context, env->Global(), argc, argv_10).ToLocalChecked(); result = foo->Call(context, env->Global(), argc, argv_10).ToLocalChecked();
...@@ -2561,7 +2561,7 @@ TEST(DebugStepForBreak) { ...@@ -2561,7 +2561,7 @@ TEST(DebugStepForBreak) {
CHECK_EQ(64, break_point_hit_count); CHECK_EQ(64, break_point_hit_count);
// Looping 100 times. // Looping 100 times.
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
v8::Local<v8::Value> argv_100[argc] = {v8::Number::New(isolate, 100)}; v8::Local<v8::Value> argv_100[argc] = {v8::Number::New(isolate, 100)};
result = foo->Call(context, env->Global(), argc, argv_100).ToLocalChecked(); result = foo->Call(context, env->Global(), argc, argv_100).ToLocalChecked();
...@@ -2596,7 +2596,7 @@ TEST(DebugStepForIn) { ...@@ -2596,7 +2596,7 @@ TEST(DebugStepForIn) {
foo = CompileFunction(&env, src_1, "foo"); foo = CompileFunction(&env, src_1, "foo");
SetBreakPoint(foo, 0); // "var a = ..." SetBreakPoint(foo, 0); // "var a = ..."
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
CHECK_EQ(8, break_point_hit_count); CHECK_EQ(8, break_point_hit_count);
...@@ -2613,7 +2613,7 @@ TEST(DebugStepForIn) { ...@@ -2613,7 +2613,7 @@ TEST(DebugStepForIn) {
foo = CompileFunction(&env, src_2, "foo"); foo = CompileFunction(&env, src_2, "foo");
SetBreakPoint(foo, 0); // "var a = ..." SetBreakPoint(foo, 0); // "var a = ..."
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
CHECK_EQ(10, break_point_hit_count); CHECK_EQ(10, break_point_hit_count);
...@@ -2649,7 +2649,7 @@ TEST(DebugStepWith) { ...@@ -2649,7 +2649,7 @@ TEST(DebugStepWith) {
v8::Local<v8::Value> result; v8::Local<v8::Value> result;
SetBreakPoint(foo, 8); // "var a = {};" SetBreakPoint(foo, 8); // "var a = {};"
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
CHECK_EQ(4, break_point_hit_count); CHECK_EQ(4, break_point_hit_count);
...@@ -2680,12 +2680,12 @@ TEST(DebugConditional) { ...@@ -2680,12 +2680,12 @@ TEST(DebugConditional) {
v8::Local<v8::Function> foo = CompileFunction(&env, src, "foo"); v8::Local<v8::Function> foo = CompileFunction(&env, src, "foo");
SetBreakPoint(foo, 0); // "var a;" SetBreakPoint(foo, 0); // "var a;"
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
CHECK_EQ(2, break_point_hit_count); CHECK_EQ(2, break_point_hit_count);
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
const int argc = 1; const int argc = 1;
v8::Local<v8::Value> argv_true[argc] = {v8::True(isolate)}; v8::Local<v8::Value> argv_true[argc] = {v8::True(isolate)};
...@@ -2711,7 +2711,7 @@ TEST(DebugStepNatives) { ...@@ -2711,7 +2711,7 @@ TEST(DebugStepNatives) {
v8::debug::SetDebugDelegate(env->GetIsolate(), &run_step); v8::debug::SetDebugDelegate(env->GetIsolate(), &run_step);
v8::Local<v8::Context> context = env.local(); v8::Local<v8::Context> context = env.local();
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
...@@ -2752,7 +2752,7 @@ TEST(DebugStepFunctionApply) { ...@@ -2752,7 +2752,7 @@ TEST(DebugStepFunctionApply) {
v8::debug::SetDebugDelegate(env->GetIsolate(), &run_step); v8::debug::SetDebugDelegate(env->GetIsolate(), &run_step);
v8::Local<v8::Context> context = env.local(); v8::Local<v8::Context> context = env.local();
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
...@@ -2800,7 +2800,7 @@ TEST(DebugStepFunctionCall) { ...@@ -2800,7 +2800,7 @@ TEST(DebugStepFunctionCall) {
// Register a debug event listener which steps and counts. // Register a debug event listener which steps and counts.
DebugEventCounter run_step; DebugEventCounter run_step;
v8::debug::SetDebugDelegate(env->GetIsolate(), &run_step); v8::debug::SetDebugDelegate(env->GetIsolate(), &run_step);
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
// Check stepping where the if condition in bar is false. // Check stepping where the if condition in bar is false.
break_point_hit_count = 0; break_point_hit_count = 0;
...@@ -2853,7 +2853,7 @@ TEST(DebugStepFunctionCallApply) { ...@@ -2853,7 +2853,7 @@ TEST(DebugStepFunctionCallApply) {
// Register a debug event listener which steps and counts. // Register a debug event listener which steps and counts.
DebugEventCounter run_step; DebugEventCounter run_step;
v8::debug::SetDebugDelegate(env->GetIsolate(), &run_step); v8::debug::SetDebugDelegate(env->GetIsolate(), &run_step);
run_step.set_step_action(StepIn); run_step.set_step_action(StepInto);
break_point_hit_count = 0; break_point_hit_count = 0;
foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked(); foo->Call(context, env->Global(), 0, nullptr).ToLocalChecked();
...@@ -3874,7 +3874,7 @@ static void RunScriptInANewCFrame(const char* source) { ...@@ -3874,7 +3874,7 @@ static void RunScriptInANewCFrame(const char* source) {
TEST(Regress131642) { TEST(Regress131642) {
// Bug description: // Bug description:
// When doing StepNext through the first script, the debugger is not reset // When doing StepOver through the first script, the debugger is not reset
// after exiting through exception. A flawed implementation enabling the // after exiting through exception. A flawed implementation enabling the
// debugger to step into Array.prototype.forEach breaks inside the callback // debugger to step into Array.prototype.forEach breaks inside the callback
// for forEach in the second script under the assumption that we are in a // for forEach in the second script under the assumption that we are in a
...@@ -3884,7 +3884,7 @@ TEST(Regress131642) { ...@@ -3884,7 +3884,7 @@ TEST(Regress131642) {
LocalContext env; LocalContext env;
v8::HandleScope scope(env->GetIsolate()); v8::HandleScope scope(env->GetIsolate());
DebugEventCounter delegate; DebugEventCounter delegate;
delegate.set_step_action(StepNext); delegate.set_step_action(StepOver);
v8::debug::SetDebugDelegate(env->GetIsolate(), &delegate); v8::debug::SetDebugDelegate(env->GetIsolate(), &delegate);
// We step through the first script. It exits through an exception. We run // We step through the first script. It exits through an exception. We run
...@@ -4073,7 +4073,7 @@ class ArchiveRestoreThread : public v8::base::Thread, ...@@ -4073,7 +4073,7 @@ class ArchiveRestoreThread : public v8::base::Thread,
// statement. If debug->{Archive,Restore}Debug() improperly reset // statement. If debug->{Archive,Restore}Debug() improperly reset
// thread-local debug information, the debugger will fail to stop // thread-local debug information, the debugger will fail to stop
// before the test function returns. // before the test function returns.
debug_->PrepareStep(StepNext); debug_->PrepareStep(StepOver);
// Spawning threads while handling the current breakpoint verifies // Spawning threads while handling the current breakpoint verifies
// that the parent thread correctly archived and restored the // that the parent thread correctly archived and restored the
...@@ -4277,7 +4277,7 @@ class DebugStepOverFunctionWithCaughtExceptionListener ...@@ -4277,7 +4277,7 @@ class DebugStepOverFunctionWithCaughtExceptionListener
inspector_break_points_hit) override { inspector_break_points_hit) override {
++break_point_hit_count; ++break_point_hit_count;
if (break_point_hit_count >= 3) return; if (break_point_hit_count >= 3) return;
PrepareStep(StepNext); PrepareStep(StepOver);
} }
int break_point_hit_count = 0; int break_point_hit_count = 0;
}; };
......
...@@ -75,8 +75,8 @@ class BreakHandler : public debug::DebugDelegate { ...@@ -75,8 +75,8 @@ class BreakHandler : public debug::DebugDelegate {
public: public:
enum Action { enum Action {
Continue = StepAction::LastStepAction + 1, Continue = StepAction::LastStepAction + 1,
StepNext = StepAction::StepNext, StepOver = StepAction::StepOver,
StepIn = StepAction::StepIn, StepInto = StepAction::StepInto,
StepOut = StepAction::StepOut StepOut = StepAction::StepOut
}; };
struct BreakPoint { struct BreakPoint {
...@@ -124,8 +124,8 @@ class BreakHandler : public debug::DebugDelegate { ...@@ -124,8 +124,8 @@ class BreakHandler : public debug::DebugDelegate {
switch (next_action) { switch (next_action) {
case Continue: case Continue:
break; break;
case StepNext: case StepOver:
case StepIn: case StepInto:
case StepOut: case StepOut:
isolate_->debug()->PrepareStep(static_cast<StepAction>(next_action)); isolate_->debug()->PrepareStep(static_cast<StepAction>(next_action));
break; break;
...@@ -249,7 +249,7 @@ class CollectValuesBreakHandler : public debug::DebugDelegate { ...@@ -249,7 +249,7 @@ class CollectValuesBreakHandler : public debug::DebugDelegate {
CHECK_EQ(WasmValWrapper{expected.stack[i]}, WasmValWrapper{stack_value}); CHECK_EQ(WasmValWrapper{expected.stack[i]}, WasmValWrapper{stack_value});
} }
isolate_->debug()->PrepareStep(StepAction::StepIn); isolate_->debug()->PrepareStep(StepAction::StepInto);
} }
}; };
...@@ -355,8 +355,8 @@ WASM_COMPILED_EXEC_TEST(WasmSimpleStepping) { ...@@ -355,8 +355,8 @@ WASM_COMPILED_EXEC_TEST(WasmSimpleStepping) {
BreakHandler count_breaks(isolate, BreakHandler count_breaks(isolate,
{ {
{1, BreakHandler::StepNext}, // I32Const {1, BreakHandler::StepOver}, // I32Const
{3, BreakHandler::StepNext}, // I32Const {3, BreakHandler::StepOver}, // I32Const
{5, BreakHandler::Continue} // I32Add {5, BreakHandler::Continue} // I32Add
}); });
...@@ -396,10 +396,10 @@ WASM_COMPILED_EXEC_TEST(WasmStepInAndOut) { ...@@ -396,10 +396,10 @@ WASM_COMPILED_EXEC_TEST(WasmStepInAndOut) {
BreakHandler count_breaks(isolate, BreakHandler count_breaks(isolate,
{ {
{19, BreakHandler::StepIn}, // LocalGet {19, BreakHandler::StepInto}, // LocalGet
{21, BreakHandler::StepIn}, // Call {21, BreakHandler::StepInto}, // Call
{1, BreakHandler::StepOut}, // in f2 {1, BreakHandler::StepOut}, // in f2
{23, BreakHandler::Continue} // After Call {23, BreakHandler::Continue} // After Call
}); });
Handle<Object> global(isolate->context().global_object(), isolate); Handle<Object> global(isolate->context().global_object(), isolate);
......
...@@ -23,7 +23,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -23,7 +23,7 @@ function listener(event, exec_state, event_data, data) {
++break_count; ++break_count;
if (break_count !== expected_breaks) { if (break_count !== expected_breaks) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
print("Next step prepared"); print("Next step prepared");
} }
} }
......
...@@ -12,7 +12,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -12,7 +12,7 @@ function listener(event, exec_state, event_data, data) {
var line = exec_state.frame(0).sourceLineText(); var line = exec_state.frame(0).sourceLineText();
log.push(line); log.push(line);
if (!/STOP/.test(line)) { if (!/STOP/.test(line)) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
} catch (e) { } catch (e) {
......
...@@ -9,7 +9,7 @@ var exception = null; ...@@ -9,7 +9,7 @@ var exception = null;
function breakListener(event, exec_state, event_data, data) { function breakListener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Break) return; if (event != Debug.DebugEvent.Break) return;
try { try {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
// Assert that the break happens at an intended location. // Assert that the break happens at an intended location.
assertTrue(exec_state.frame(0).sourceLineText().indexOf("// break") > 0); assertTrue(exec_state.frame(0).sourceLineText().indexOf("// break") > 0);
} catch (e) { } catch (e) {
......
...@@ -33,7 +33,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -33,7 +33,7 @@ function listener(event, exec_state, event_data, data) {
if (event == Debug.DebugEvent.Break) if (event == Debug.DebugEvent.Break)
{ {
call_graph += exec_state.frame().func().name(); call_graph += exec_state.frame().func().name();
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
}; };
......
...@@ -33,7 +33,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -33,7 +33,7 @@ function listener(event, exec_state, event_data, data) {
assertEquals(2, match.length); assertEquals(2, match.length);
log.push(match[1] + col); log.push(match[1] + col);
if (match[1] != "v") { if (match[1] != "v") {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} catch (e) { } catch (e) {
exception = e; exception = e;
......
...@@ -59,7 +59,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -59,7 +59,7 @@ function listener(event, exec_state, event_data, data) {
default: default:
fail("Unexpected"); fail("Unexpected");
} }
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} else { } else {
// Position at the end of the function. // Position at the end of the function.
assertEquals(expected_source_position.shift() + debugger_source_position, assertEquals(expected_source_position.shift() + debugger_source_position,
......
...@@ -10,7 +10,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -10,7 +10,7 @@ function listener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Break) return; if (event != Debug.DebugEvent.Break) return;
try { try {
assertEquals(expected.shift(), exec_state.frame(0).sourceLineText()); assertEquals(expected.shift(), exec_state.frame(0).sourceLineText());
exec_state.prepareStep(Debug.StepAction.StepNext); exec_state.prepareStep(Debug.StepAction.StepOver);
} catch (e) { } catch (e) {
%AbortJS(e + "\n" + e.stack); %AbortJS(e + "\n" + e.stack);
} }
......
...@@ -14,7 +14,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -14,7 +14,7 @@ function listener(event, exec_state, event_data, data) {
print(event_data.sourceLineText()); print(event_data.sourceLineText());
assertTrue( assertTrue(
event_data.sourceLineText().indexOf(`Break ${break_count++}.`) > 0); event_data.sourceLineText().indexOf(`Break ${break_count++}.`) > 0);
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} catch (e) { } catch (e) {
exception = e; exception = e;
} }
......
...@@ -13,7 +13,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -13,7 +13,7 @@ function listener(event, exec_state, event_data, data) {
try { try {
print(event_data.sourceLineText()); print(event_data.sourceLineText());
assertTrue(event_data.sourceLineText().indexOf(`Break ${break_count++}.`) > 0); assertTrue(event_data.sourceLineText().indexOf(`Break ${break_count++}.`) > 0);
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} catch (e) { } catch (e) {
exception = e; exception = e;
} }
......
...@@ -12,7 +12,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -12,7 +12,7 @@ function listener(event, exec_state, event_data, data) {
var line = exec_state.frame(0).sourceLineText(); var line = exec_state.frame(0).sourceLineText();
log.push(line); log.push(line);
if (!/STOP/.test(line)) { if (!/STOP/.test(line)) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
} catch (e) { } catch (e) {
......
...@@ -34,7 +34,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -34,7 +34,7 @@ function listener(event, exec_state, event_data, data) {
break_break_point_hit_count++; break_break_point_hit_count++;
// Continue stepping until returned to bottom frame. // Continue stepping until returned to bottom frame.
if (exec_state.frameCount() > 1) { if (exec_state.frameCount() > 1) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
}; };
......
...@@ -33,7 +33,7 @@ var break_count = 0; ...@@ -33,7 +33,7 @@ var break_count = 0;
function listener(event, exec_state, event_data, data) { function listener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Break) return; if (event != Debug.DebugEvent.Break) return;
try { try {
exec_state.prepareStep(Debug.StepAction.StepNext); exec_state.prepareStep(Debug.StepAction.StepOver);
print(exec_state.frame(0).sourceLineText()); print(exec_state.frame(0).sourceLineText());
var match = exec_state.frame(0).sourceLineText().match(/Break (\d)/); var match = exec_state.frame(0).sourceLineText().match(/Break (\d)/);
assertNotNull(match); assertNotNull(match);
......
...@@ -15,7 +15,7 @@ var bp1, bp2; ...@@ -15,7 +15,7 @@ var bp1, bp2;
function listener(event, exec_state, event_data, data) { function listener(event, exec_state, event_data, data) {
if (event == Debug.DebugEvent.Break) { if (event == Debug.DebugEvent.Break) {
if (step_count > 0) { if (step_count > 0) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
step_count--; step_count--;
} else { } else {
result = exec_state.frame().evaluate("i").value(); result = exec_state.frame().evaluate("i").value();
......
...@@ -30,7 +30,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -30,7 +30,7 @@ function listener(event, exec_state, event_data, data) {
try { try {
var source_line = exec_state.frame(0).sourceLineText(); var source_line = exec_state.frame(0).sourceLineText();
assertTrue(source_line.indexOf("// Break") > 0); assertTrue(source_line.indexOf("// Break") > 0);
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
break_count++; break_count++;
} catch (e) { } catch (e) {
exception = e; exception = e;
......
...@@ -45,7 +45,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -45,7 +45,7 @@ function listener(event, exec_state, event_data, data) {
assertEquals(expected_function_name, event_data.func().name()); assertEquals(expected_function_name, event_data.func().name());
state = 4; state = 4;
} else { } else {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
state++; state++;
} }
} }
......
...@@ -14,7 +14,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -14,7 +14,7 @@ function listener(event, exec_state, event_data, data) {
print(event_data.sourceLineText()); print(event_data.sourceLineText());
assertTrue( assertTrue(
event_data.sourceLineText().indexOf(`Break ${break_count++}.`) > 0); event_data.sourceLineText().indexOf(`Break ${break_count++}.`) > 0);
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} catch (e) { } catch (e) {
exception = e; exception = e;
} }
......
...@@ -37,7 +37,7 @@ function array_listener(event, exec_state, event_data, data) { ...@@ -37,7 +37,7 @@ function array_listener(event, exec_state, event_data, data) {
if (event == Debug.DebugEvent.Break) { if (event == Debug.DebugEvent.Break) {
print(event_data.sourceLineText(), breaks); print(event_data.sourceLineText(), breaks);
assertTrue(event_data.sourceLineText().indexOf(`B${breaks++}`) > 0); assertTrue(event_data.sourceLineText().indexOf(`B${breaks++}`) > 0);
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} catch (e) { } catch (e) {
print(e); print(e);
......
...@@ -45,7 +45,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -45,7 +45,7 @@ function listener(event, exec_state, event_data, data) {
event_data.sourceLineText()); event_data.sourceLineText());
state = 4; state = 4;
} else { } else {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
state++; state++;
} }
} }
......
...@@ -42,7 +42,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -42,7 +42,7 @@ function listener(event, exec_state, event_data, data) {
if (event == Debug.DebugEvent.Break) { if (event == Debug.DebugEvent.Break) {
if (state < step_in_count) { if (state < step_in_count) {
// Step into f(). // Step into f().
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
state++; state++;
} else { } else {
assertEquals(expected_source_line_text, assertEquals(expected_source_line_text,
......
...@@ -11,7 +11,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -11,7 +11,7 @@ function listener(event, exec_state, event_data, data) {
try { try {
var source_line = exec_state.frame(0).sourceLineText(); var source_line = exec_state.frame(0).sourceLineText();
print(source_line); print(source_line);
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
break_count++; break_count++;
} catch (e) { } catch (e) {
exception = e; exception = e;
......
...@@ -34,7 +34,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -34,7 +34,7 @@ function listener(event, exec_state, event_data, data) {
break_break_point_hit_count++; break_break_point_hit_count++;
// Continue stepping until returned to bottom frame. // Continue stepping until returned to bottom frame.
if (exec_state.frameCount() > 1) { if (exec_state.frameCount() > 1) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
}; };
......
...@@ -20,7 +20,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -20,7 +20,7 @@ function listener(event, exec_state, event_data, data) {
"Expected: // Break " + break_count + "."); "Expected: // Break " + break_count + ".");
++break_count; ++break_count;
if (break_count !== expected_breaks) { if (break_count !== expected_breaks) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
} catch(e) { } catch(e) {
......
...@@ -38,7 +38,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -38,7 +38,7 @@ function listener(event, exec_state, event_data, data) {
if (event == Debug.DebugEvent.Break) { if (event == Debug.DebugEvent.Break) {
if (state < 2) { if (state < 2) {
// Step into f2.call: // Step into f2.call:
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
state++; state++;
} else { } else {
assertEquals('g', event_data.func().name()); assertEquals('g', event_data.func().name());
......
...@@ -38,7 +38,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -38,7 +38,7 @@ function listener(event, exec_state, event_data, data) {
try { try {
if (event == Debug.DebugEvent.Break) { if (event == Debug.DebugEvent.Break) {
if (state < 4) { if (state < 4) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
state++; state++;
} else { } else {
assertTrue(event_data.sourceLineText().indexOf("Expected to step") > 0, assertTrue(event_data.sourceLineText().indexOf("Expected to step") > 0,
......
...@@ -46,7 +46,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -46,7 +46,7 @@ function listener(event, exec_state, event_data, data) {
break_break_point_hit_count++; break_break_point_hit_count++;
// Continue stepping until returned to bottom frame. // Continue stepping until returned to bottom frame.
if (exec_state.frameCount() > 1) { if (exec_state.frameCount() > 1) {
exec_state.prepareStep(Debug.StepAction.StepNext); exec_state.prepareStep(Debug.StepAction.StepOver);
} }
} }
......
...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) {
} }
// Do steps until we reach the global scope again. // Do steps until we reach the global scope again.
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
......
...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) {
} }
// Do steps until we reach the global scope again. // Do steps until we reach the global scope again.
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
......
...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) {
} }
// Do steps until we reach the global scope again. // Do steps until we reach the global scope again.
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
......
...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) {
} }
// Do steps until we reach the global scope again. // Do steps until we reach the global scope again.
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
......
...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) {
} }
// Do steps until we reach the global scope again. // Do steps until we reach the global scope again.
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
......
...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) {
} }
// Do steps until we reach the global scope again. // Do steps until we reach the global scope again.
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
......
...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) {
} }
// Do steps until we reach the global scope again. // Do steps until we reach the global scope again.
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
......
...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -43,7 +43,7 @@ function listener(event, exec_state, event_data, data) {
} }
// Do steps until we reach the global scope again. // Do steps until we reach the global scope again.
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
......
...@@ -13,7 +13,7 @@ var step_count = 0; ...@@ -13,7 +13,7 @@ var step_count = 0;
function listener(event, execState, eventData, data) { function listener(event, execState, eventData, data) {
if (event != Debug.DebugEvent.Break) return; if (event != Debug.DebugEvent.Break) return;
try { try {
execState.prepareStep(Debug.StepAction.StepIn); execState.prepareStep(Debug.StepAction.StepInto);
var s = execState.frame().sourceLineText(); var s = execState.frame().sourceLineText();
step_count++; step_count++;
assertTrue(s.indexOf('// ' + step_count + '.') >= 0); assertTrue(s.indexOf('// ' + step_count + '.') >= 0);
......
...@@ -11,7 +11,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -11,7 +11,7 @@ function listener(event, exec_state, event_data, data) {
if (event != Debug.DebugEvent.Break) return; if (event != Debug.DebugEvent.Break) return;
try { try {
breaks.push(exec_state.frame(0).sourceLineText().trimLeft()); breaks.push(exec_state.frame(0).sourceLineText().trimLeft());
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} catch (e) { } catch (e) {
exception = e; exception = e;
} }
......
...@@ -21,7 +21,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -21,7 +21,7 @@ function listener(event, exec_state, event_data, data) {
"Expected: // Break " + break_count + "."); "Expected: // Break " + break_count + ".");
++break_count; ++break_count;
if (break_count !== expected_breaks) { if (break_count !== expected_breaks) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
} catch(e) { } catch(e) {
......
...@@ -14,9 +14,9 @@ function listener(event, exec_state, event_data, data) { ...@@ -14,9 +14,9 @@ function listener(event, exec_state, event_data, data) {
print(source); print(source);
assertTrue(source.indexOf(`// B${break_count++}`) > 0); assertTrue(source.indexOf(`// B${break_count++}`) > 0);
if (source.indexOf("assertEquals") > 0) { if (source.indexOf("assertEquals") > 0) {
exec_state.prepareStep(Debug.StepAction.StepNext); exec_state.prepareStep(Debug.StepAction.StepOver);
} else { } else {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} catch (e) { } catch (e) {
exception = e; exception = e;
......
...@@ -14,9 +14,9 @@ function listener(event, exec_state, event_data, data) { ...@@ -14,9 +14,9 @@ function listener(event, exec_state, event_data, data) {
print(source, break_count); print(source, break_count);
assertTrue(source.indexOf(`B${break_count++}`) > 0); assertTrue(source.indexOf(`B${break_count++}`) > 0);
if (source.indexOf("assertEquals") > 0) { if (source.indexOf("assertEquals") > 0) {
exec_state.prepareStep(Debug.StepAction.StepNext); exec_state.prepareStep(Debug.StepAction.StepOver);
} else { } else {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} catch (e) { } catch (e) {
exception = e; exception = e;
......
...@@ -13,7 +13,7 @@ var stepCount = 0; ...@@ -13,7 +13,7 @@ var stepCount = 0;
function listener(event, execState, eventData, data) { function listener(event, execState, eventData, data) {
if (event == Debug.DebugEvent.Break) { if (event == Debug.DebugEvent.Break) {
if (!done) { if (!done) {
execState.prepareStep(Debug.StepAction.StepIn); execState.prepareStep(Debug.StepAction.StepInto);
var s = execState.frame().sourceLineText(); var s = execState.frame().sourceLineText();
assertTrue(s.indexOf('// ' + stepCount + '.') !== -1); assertTrue(s.indexOf('// ' + stepCount + '.') !== -1);
stepCount++; stepCount++;
......
...@@ -13,7 +13,7 @@ function listener(event, execState, eventData, data) { ...@@ -13,7 +13,7 @@ function listener(event, execState, eventData, data) {
if (event != Debug.DebugEvent.Break) return; if (event != Debug.DebugEvent.Break) return;
try { try {
if (!done) { if (!done) {
execState.prepareStep(Debug.StepAction.StepIn); execState.prepareStep(Debug.StepAction.StepInto);
var s = execState.frame().sourceLineText(); var s = execState.frame().sourceLineText();
assertTrue(s.indexOf('// ' + stepCount + '.') !== -1); assertTrue(s.indexOf('// ' + stepCount + '.') !== -1);
stepCount++; stepCount++;
......
...@@ -14,7 +14,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -14,7 +14,7 @@ function listener(event, exec_state, event_data, data) {
print(event_data.sourceLineText()); print(event_data.sourceLineText());
assertTrue( assertTrue(
event_data.sourceLineText().indexOf(`Break ${break_count++}.`) > 0); event_data.sourceLineText().indexOf(`Break ${break_count++}.`) > 0);
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} catch (e) { } catch (e) {
exception = e; exception = e;
} }
......
...@@ -10,7 +10,7 @@ var exception = null; ...@@ -10,7 +10,7 @@ var exception = null;
function listener(event, exec_state, event_data, data) { function listener(event, exec_state, event_data, data) {
try { try {
if (event == Debug.DebugEvent.Break) { if (event == Debug.DebugEvent.Break) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
print(event_data.sourceLineText()); print(event_data.sourceLineText());
assertTrue( assertTrue(
event_data.sourceLineText().indexOf(`B${breaks++}`) > 0); event_data.sourceLineText().indexOf(`B${breaks++}`) > 0);
......
...@@ -18,7 +18,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -18,7 +18,7 @@ function listener(event, exec_state, event_data, data) {
entry += exec_state.frame(i).sourceColumn(); entry += exec_state.frame(i).sourceColumn();
} }
log.push(entry); log.push(entry);
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} catch (e) { } catch (e) {
exception = e; exception = e;
} }
......
...@@ -17,7 +17,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -17,7 +17,7 @@ function listener(event, exec_state, event_data, data) {
if (yields == 4) { if (yields == 4) {
exec_state.prepareStep(Debug.StepAction.StepOut); exec_state.prepareStep(Debug.StepAction.StepOut);
} else { } else {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} catch (e) { } catch (e) {
print(e, e.stack); print(e, e.stack);
......
...@@ -18,11 +18,11 @@ function listener(event, exec_state, event_data, data) { ...@@ -18,11 +18,11 @@ function listener(event, exec_state, event_data, data) {
"Unexpected pause at: " + source + "\n" + "Unexpected pause at: " + source + "\n" +
"Expected: // Break " + break_count + "."); "Expected: // Break " + break_count + ".");
if (source.indexOf("StepOver.") !== -1) { if (source.indexOf("StepOver.") !== -1) {
exec_state.prepareStep(Debug.StepAction.StepNext); exec_state.prepareStep(Debug.StepAction.StepOver);
} else if (source.indexOf("StepOut.") !== -1) { } else if (source.indexOf("StepOut.") !== -1) {
exec_state.prepareStep(Debug.StepAction.StepOut); exec_state.prepareStep(Debug.StepAction.StepOut);
} else { } else {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
++break_count; ++break_count;
} }
......
...@@ -18,7 +18,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -18,7 +18,7 @@ function listener(event, exec_state, event_data, data) {
entry += exec_state.frame(i).sourceColumn(); entry += exec_state.frame(i).sourceColumn();
} }
log.push(entry); log.push(entry);
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} catch (e) { } catch (e) {
exception = e; exception = e;
} }
......
...@@ -18,7 +18,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -18,7 +18,7 @@ function listener(event, exec_state, event_data, data) {
entry += exec_state.frame(i).sourceColumn(); entry += exec_state.frame(i).sourceColumn();
} }
log.push(entry); log.push(entry);
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} catch (e) { } catch (e) {
exception = e; exception = e;
} }
......
...@@ -79,7 +79,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -79,7 +79,7 @@ function listener(event, exec_state, event_data, data) {
var match = line.match(/\/\/ Break (\w)$/); var match = line.match(/\/\/ Break (\w)$/);
assertEquals(2, match.length); assertEquals(2, match.length);
log.push(match[1] + col); log.push(match[1] + col);
exec_state.prepareStep(Debug.StepAction.StepNext); exec_state.prepareStep(Debug.StepAction.StepOver);
break_count++; break_count++;
} catch (e) { } catch (e) {
exception = e; exception = e;
......
...@@ -15,9 +15,9 @@ function listener(event, exec_state, event_data, data) { ...@@ -15,9 +15,9 @@ function listener(event, exec_state, event_data, data) {
if (/step out/.test(source)) { if (/step out/.test(source)) {
exec_state.prepareStep(Debug.StepAction.StepOut); exec_state.prepareStep(Debug.StepAction.StepOut);
} else if (/step in/.test(source)) { } else if (/step in/.test(source)) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} else { } else {
exec_state.prepareStep(Debug.StepAction.StepNext); exec_state.prepareStep(Debug.StepAction.StepOver);
} }
} catch (e) { } catch (e) {
print(e, e.stack); print(e, e.stack);
......
...@@ -38,7 +38,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -38,7 +38,7 @@ function listener(event, exec_state, event_data, data) {
++break_count; ++break_count;
if (break_count !== expected_breaks) { if (break_count !== expected_breaks) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
print("Next step prepared"); print("Next step prepared");
} }
} }
......
...@@ -33,10 +33,10 @@ function g() { ...@@ -33,10 +33,10 @@ function g() {
async function f() { async function f() {
var a = 1; var a = 1;
debugger; // B0 StepNext debugger; // B0 StepOver
a += a +=
await // B1 StepIn await // B1 StepInto
g(); // B2 StepIn g(); // B2 StepInto
return a; return a;
} }
...@@ -44,7 +44,7 @@ f(); ...@@ -44,7 +44,7 @@ f();
// Starting a new step action at an intermediate break point // Starting a new step action at an intermediate break point
// means that we will abort the current async step. // means that we will abort the current async step.
debugger; // B3 StepNext debugger; // B3 StepOver
late_resolve(3); // B4 Continue late_resolve(3); // B4 Continue
......
...@@ -33,10 +33,10 @@ function g() { ...@@ -33,10 +33,10 @@ function g() {
async function f() { async function f() {
var a = 1; var a = 1;
debugger; // B0 StepNext debugger; // B0 StepOver
a += a +=
await // B1 StepIn await // B1 StepInto
g(); // B2 StepIn g(); // B2 StepInto
return a; // B4 Continue return a; // B4 Continue
} }
......
...@@ -33,9 +33,9 @@ function g() { ...@@ -33,9 +33,9 @@ function g() {
async function f() { async function f() {
var a = 1; var a = 1;
debugger; // B0 StepNext debugger; // B0 StepOver
a += a +=
await // B1 StepIn await // B1 StepInto
g(); g();
return a; // B3 Continue return a; // B3 Continue
} }
......
...@@ -33,9 +33,9 @@ function g() { ...@@ -33,9 +33,9 @@ function g() {
async function f() { async function f() {
var a = 1; var a = 1;
debugger; // B0 StepNext debugger; // B0 StepOver
a += a +=
await // B1 StepIn await // B1 StepInto
g(); g();
return a; // B3 Continue return a; // B3 Continue
} }
......
...@@ -24,18 +24,18 @@ Debug.setListener(listener); ...@@ -24,18 +24,18 @@ Debug.setListener(listener);
var late_resolve; var late_resolve;
function g() { function g() {
return new Promise( // B2 StepIn return new Promise( // B2 StepInto
function(res, rej) { function(res, rej) {
late_resolve = res; // B3 StepIn late_resolve = res; // B3 StepInto
} // B4 StepIn } // B4 StepInto
); // B5 StepIn ); // B5 StepInto
} }
async function f() { async function f() {
var a = 1; var a = 1;
debugger; // B0 StepNext debugger; // B0 StepOver
a += a +=
await // B1 StepIn await // B1 StepInto
g(); g();
return a; // B6 Continue return a; // B6 Continue
} }
......
...@@ -33,15 +33,15 @@ function g() { ...@@ -33,15 +33,15 @@ function g() {
async function f1() { async function f1() {
var a = 1; var a = 1;
debugger; // B0 StepNext debugger; // B0 StepOver
a += a +=
await // B1 StepIn await // B1 StepInto
f2(); // B2 StepIn f2(); // B2 StepInto
return a; // B5 Continue return a; // B5 Continue
} }
async function f2() { async function f2() {
var b = 0 + // B2 StepIn var b = 0 + // B2 StepInto
await await
g(); g();
return b; // B4 StepOut return b; // B4 StepOut
......
...@@ -23,8 +23,8 @@ Debug.setListener(listener); ...@@ -23,8 +23,8 @@ Debug.setListener(listener);
async function f() { async function f() {
var a = 1; var a = 1;
debugger; // B0 StepNext debugger; // B0 StepOver
a += // B1 StepNext a += // B1 StepOver
await await
5; 5;
return a; // B2 Continue return a; // B2 Continue
......
...@@ -33,9 +33,9 @@ function g() { ...@@ -33,9 +33,9 @@ function g() {
async function f() { async function f() {
var a = 1; var a = 1;
debugger; // B0 StepNext debugger; // B0 StepOver
a += a +=
await // B1 StepNext await // B1 StepOver
g(); g();
return a; // B2 Continue return a; // B2 Continue
} }
......
...@@ -33,7 +33,7 @@ function g() { ...@@ -33,7 +33,7 @@ function g() {
async function f() { async function f() {
var a = 1; var a = 1;
debugger; // B0 StepNext debugger; // B0 StepOver
a += await g(); // B1 StepOut a += await g(); // B1 StepOut
return a; return a;
} }
......
...@@ -12,7 +12,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -12,7 +12,7 @@ function listener(event, exec_state, event_data, data) {
// Access scope details to check the context is correct. // Access scope details to check the context is correct.
var scope_count = exec_state.frame().scopeCount(); var scope_count = exec_state.frame().scopeCount();
// Do steps until we reach the global scope again. // Do steps until we reach the global scope again.
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} }
......
...@@ -37,7 +37,7 @@ var values = []; ...@@ -37,7 +37,7 @@ var values = [];
// Debug event listener which steps until the global variable done is true. // Debug event listener which steps until the global variable done is true.
function listener(event, exec_state, event_data, data) { function listener(event, exec_state, event_data, data) {
if (event == Debug.DebugEvent.Break) { if (event == Debug.DebugEvent.Break) {
if (!done) exec_state.prepareStep(Debug.StepAction.StepNext); if (!done) exec_state.prepareStep(Debug.StepAction.StepOver);
step_count++; step_count++;
} }
}; };
......
...@@ -15,7 +15,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -15,7 +15,7 @@ function listener(event, exec_state, event_data, data) {
var column = event_data.sourceColumn(); var column = event_data.sourceColumn();
assertTrue(event_data.sourceLineText().indexOf( assertTrue(event_data.sourceLineText().indexOf(
`Break ${break_count++}. ${column}.`) > 0); `Break ${break_count++}. ${column}.`) > 0);
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} catch (e) { } catch (e) {
print(e + e.stack); print(e + e.stack);
exception = e; exception = e;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
Debug = debug.Debug Debug = debug.Debug
function breakListener(event, exec_state, event_data, data) { function breakListener(event, exec_state, event_data, data) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
Debug.setListener(breakListener); Debug.setListener(breakListener);
......
...@@ -32,7 +32,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -32,7 +32,7 @@ function listener(event, exec_state, event_data, data) {
for (var i = 0, n = exec_state.frameCount(); i < n; i++) { for (var i = 0, n = exec_state.frameCount(); i < n; i++) {
exec_state.frame().scopeCount(i); exec_state.frame().scopeCount(i);
} }
exec_state.prepareStep(Debug.StepAction.StepNext); exec_state.prepareStep(Debug.StepAction.StepOver);
} }
Debug.setListener(listener); Debug.setListener(listener);
......
...@@ -30,7 +30,7 @@ Debug = debug.Debug; ...@@ -30,7 +30,7 @@ Debug = debug.Debug;
function listener(event, exec_state, event_data, data) { function listener(event, exec_state, event_data, data) {
if (event == Debug.DebugEvent.Break) { if (event == Debug.DebugEvent.Break) {
exec_state.prepareStep(Debug.StepAction.StepNext); exec_state.prepareStep(Debug.StepAction.StepOver);
} }
}; };
......
...@@ -39,7 +39,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -39,7 +39,7 @@ function listener(event, exec_state, event_data, data) {
"should not break on unexpected lines") "should not break on unexpected lines")
assertEquals('BREAK ' + breaks, line.substr(-7)); assertEquals('BREAK ' + breaks, line.substr(-7));
breaks++; breaks++;
if (breaks < 4) exec_state.prepareStep(Debug.StepAction.StepNext); if (breaks < 4) exec_state.prepareStep(Debug.StepAction.StepOver);
} }
} catch (e) { } catch (e) {
print(e); print(e);
......
...@@ -29,7 +29,7 @@ Debug = debug.Debug ...@@ -29,7 +29,7 @@ Debug = debug.Debug
function listener(event, exec_state, event_data, data) { function listener(event, exec_state, event_data, data) {
if (event == Debug.DebugEvent.Break) { if (event == Debug.DebugEvent.Break) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
}; };
......
...@@ -18,7 +18,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -18,7 +18,7 @@ function listener(event, exec_state, event_data, data) {
try { try {
Debug.debuggerFlags().breakPointsActive.setValue(false); Debug.debuggerFlags().breakPointsActive.setValue(false);
breaks.push(exec_state.frame().sourceLineText().trimLeft()); breaks.push(exec_state.frame().sourceLineText().trimLeft());
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} catch (e) { } catch (e) {
exception = e; exception = e;
} }
......
...@@ -9,7 +9,7 @@ var exception = null; ...@@ -9,7 +9,7 @@ var exception = null;
function listener(event, exec_state, event_data, data) { function listener(event, exec_state, event_data, data) {
try { try {
if (event == Debug.DebugEvent.Break) { if (event == Debug.DebugEvent.Break) {
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} }
} catch (e) { } catch (e) {
exception = e; exception = e;
......
...@@ -17,7 +17,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -17,7 +17,7 @@ function listener(event, exec_state, event_data, data) {
if (exec_state.frame(0).sourceLineText().indexOf("Break") <0) { if (exec_state.frame(0).sourceLineText().indexOf("Break") <0) {
error_count++; error_count++;
} }
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
f(); // We should not break in this call of f(). f(); // We should not break in this call of f().
} catch (e) { } catch (e) {
print(e + e.stack); print(e + e.stack);
......
...@@ -19,7 +19,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -19,7 +19,7 @@ function listener(event, exec_state, event_data, data) {
var label = +exec_state.frame(0).sourceLineText().substr(-1); var label = +exec_state.frame(0).sourceLineText().substr(-1);
log.push(label); log.push(label);
if (label == 2) log.push(exec_state.frame(0).evaluate("i").value()); if (label == 2) log.push(exec_state.frame(0).evaluate("i").value());
exec_state.prepareStep(Debug.StepAction.StepNext); exec_state.prepareStep(Debug.StepAction.StepOver);
} catch (e) { } catch (e) {
exception = e; exception = e;
print("Caught something. " + e + " " + e.stack); print("Caught something. " + e + " " + e.stack);
......
...@@ -14,7 +14,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -14,7 +14,7 @@ function listener(event, exec_state, event_data, data) {
try { try {
var line = exec_state.frame(0).sourceLineText().trimLeft(); var line = exec_state.frame(0).sourceLineText().trimLeft();
log.push(line); log.push(line);
if (line == "debugger;") exec_state.prepareStep(Debug.StepAction.StepNext); if (line == "debugger;") exec_state.prepareStep(Debug.StepAction.StepOver);
} catch (e) { } catch (e) {
%AbortJS(e + "\n" + e.stack); %AbortJS(e + "\n" + e.stack);
} }
......
...@@ -15,7 +15,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -15,7 +15,7 @@ function listener(event, exec_state, event_data, data) {
try { try {
var line = exec_state.frame(0).sourceLineText().trimLeft(); var line = exec_state.frame(0).sourceLineText().trimLeft();
assertEquals(expected.shift(), line); assertEquals(expected.shift(), line);
if (line == "debugger;") exec_state.prepareStep(Debug.StepAction.StepNext); if (line == "debugger;") exec_state.prepareStep(Debug.StepAction.StepOver);
} catch (e) { } catch (e) {
%AbortJS(e + "\n" + e.stack); %AbortJS(e + "\n" + e.stack);
} }
......
...@@ -13,7 +13,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -13,7 +13,7 @@ function listener(event, exec_state, event_data, data) {
try { try {
var line = exec_state.frame(0).sourceLineText().trimLeft(); var line = exec_state.frame(0).sourceLineText().trimLeft();
log.push(line); log.push(line);
if (line == "debugger;") exec_state.prepareStep(Debug.StepAction.StepNext); if (line == "debugger;") exec_state.prepareStep(Debug.StepAction.StepOver);
} catch (e) { } catch (e) {
%AbortJS(e + "\n" + e.stack); %AbortJS(e + "\n" + e.stack);
} }
......
...@@ -12,7 +12,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -12,7 +12,7 @@ function listener(event, exec_state, event_data, data) {
try { try {
var line = exec_state.frame(0).sourceLineText().trimLeft(); var line = exec_state.frame(0).sourceLineText().trimLeft();
log.push(line); log.push(line);
if (line == "debugger;") exec_state.prepareStep(Debug.StepAction.StepNext); if (line == "debugger;") exec_state.prepareStep(Debug.StepAction.StepOver);
} catch (e) { } catch (e) {
%AbortJS(e + "\n" + e.stack); %AbortJS(e + "\n" + e.stack);
} }
......
...@@ -17,7 +17,7 @@ function listener(event, execState, eventData, data) { ...@@ -17,7 +17,7 @@ function listener(event, execState, eventData, data) {
var x_value = execState.frame().evaluate("String(x)").value(); var x_value = execState.frame().evaluate("String(x)").value();
if (steps < 2) { if (steps < 2) {
assertEquals("undefined", x_value); assertEquals("undefined", x_value);
execState.prepareStep(Debug.StepAction.StepIn); execState.prepareStep(Debug.StepAction.StepInto);
} else { } else {
assertEquals("l => l", x_value); assertEquals("l => l", x_value);
} }
......
...@@ -39,7 +39,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -39,7 +39,7 @@ function listener(event, exec_state, event_data, data) {
assertTrue(event_data.functionName() == '$sub'); assertTrue(event_data.functionName() == '$sub');
wasm_break_count++; wasm_break_count++;
} }
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} catch (e) { } catch (e) {
exception = e; exception = e;
print(e); print(e);
......
...@@ -60,7 +60,7 @@ function onBreak(event, exec_state, data) { ...@@ -60,7 +60,7 @@ function onBreak(event, exec_state, data) {
assertTrue(expected_breaks.length > 0, 'expecting more breaks'); assertTrue(expected_breaks.length > 0, 'expecting more breaks');
const expected_pos = expected_breaks.shift(); const expected_pos = expected_breaks.shift();
assertEquals(expected_pos, pos); assertEquals(expected_pos, pos);
exec_state.prepareStep(Debug.StepAction.StepIn); exec_state.prepareStep(Debug.StepAction.StepInto);
} catch (e) { } catch (e) {
if (!error) error = e; if (!error) error = e;
} }
......
...@@ -23,9 +23,9 @@ Debug.setListener(listener); ...@@ -23,9 +23,9 @@ Debug.setListener(listener);
async function f() { async function f() {
var a = 1; var a = 1;
debugger; // B0 StepNext debugger; // B0 StepOver
print(1); // B1 StepNext print(1); // B1 StepOver
return a + // B2 StepNext return a + // B2 StepOver
0; // B3 Continue 0; // B3 Continue
} }
......
...@@ -29,7 +29,7 @@ var exception = null; ...@@ -29,7 +29,7 @@ var exception = null;
function listener(event, exec_state, event_data, data) { function listener(event, exec_state, event_data, data) {
if (event == Debug.DebugEvent.Exception) { if (event == Debug.DebugEvent.Exception) {
step_count++; step_count++;
exec_state.prepareStep(Debug.StepAction.StepNext); exec_state.prepareStep(Debug.StepAction.StepOver);
} else if (event == Debug.DebugEvent.Break) { } else if (event == Debug.DebugEvent.Break) {
step_count++; step_count++;
try { try {
......
...@@ -28,7 +28,7 @@ function listener(event, exec_state, event_data, data) { ...@@ -28,7 +28,7 @@ function listener(event, exec_state, event_data, data) {
} }
scopes_checked = true; scopes_checked = true;
} }
if (step_count++ < 3) exec_state.prepareStep(Debug.StepAction.StepNext); if (step_count++ < 3) exec_state.prepareStep(Debug.StepAction.StepOver);
} catch (e) { } catch (e) {
exception = e; exception = e;
print(e, e.stack); print(e, e.stack);
......
...@@ -23,9 +23,9 @@ Debug.setListener((event, execState, eventData, data) => { ...@@ -23,9 +23,9 @@ Debug.setListener((event, execState, eventData, data) => {
}); });
function f(x) { function f(x) {
debugger; // B0 StepNext debugger; // B0 StepOver
with ({}) { // B1 StepNext with ({}) { // B1 StepOver
return x // B2 StepNext return x // B2 StepOver
; // B3 Continue ; // B3 Continue
} }
} }
......
...@@ -276,7 +276,7 @@ let break_count = 0; ...@@ -276,7 +276,7 @@ let break_count = 0;
function listener(event, exec_state, event_data, data) { function listener(event, exec_state, event_data, data) {
if (event != debug.Debug.DebugEvent.Break) return; if (event != debug.Debug.DebugEvent.Break) return;
try { try {
exec_state.prepareStep(debug.Debug.StepAction.StepNext); exec_state.prepareStep(debug.Debug.StepAction.StepOver);
break_count++; break_count++;
} catch { } catch {
%AbortJS("unexpected exception"); %AbortJS("unexpected exception");
......
...@@ -37,8 +37,8 @@ class DebugWrapper { ...@@ -37,8 +37,8 @@ class DebugWrapper {
// The different types of steps. // The different types of steps.
this.StepAction = { StepOut: 0, this.StepAction = { StepOut: 0,
StepNext: 1, StepOver: 1,
StepIn: 2, StepInto: 2,
}; };
// A copy of the scope types from runtime-debug.cc. // A copy of the scope types from runtime-debug.cc.
...@@ -307,8 +307,8 @@ class DebugWrapper { ...@@ -307,8 +307,8 @@ class DebugWrapper {
execStatePrepareStep(action) { execStatePrepareStep(action) {
switch(action) { switch(action) {
case this.StepAction.StepOut: this.stepOut(); break; case this.StepAction.StepOut: this.stepOut(); break;
case this.StepAction.StepNext: this.stepOver(); break; case this.StepAction.StepOver: this.stepOver(); break;
case this.StepAction.StepIn: this.stepInto(); break; case this.StepAction.StepInto: this.stepInto(); break;
default: %AbortJS("Unsupported StepAction"); break; default: %AbortJS("Unsupported StepAction"); break;
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
// TODO(kozyatinskiy): on StepOut and probably StepNext at return position // TODO(kozyatinskiy): on StepOut and probably StepOver at return position
// of async generator we should break at next instruction of resumed generator // of async generator we should break at next instruction of resumed generator
// instead of next scheduled microtask. // instead of next scheduled microtask.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment