Commit b32ee40d authored by jgruber's avatar jgruber Committed by Commit bot

[debug-wrapper] Conditional breaks, locals, evaluate, scopes

This CL adds support for:
* conditional breaks in setBreakpoint,
* locals in frame.local{Count,Name,Value},
* evaluation on a frame in frame.evaluate,
* and more detailed scope information in scopeObject.

Uses of several functions that are not covered by the
inspector protocol and are only used in tests have been removed.

Local handling has been modified to also include arguments as locals.
Inspector differs in this regard from our FrameDetails in that
arguments are always shown as locals. Argument-related functions
were removed.

BUG=v8:5530

Review-Url: https://codereview.chromium.org/2491543002
Cr-Commit-Position: refs/heads/master@{#40917}
parent 758b317c
......@@ -45,23 +45,19 @@ var input = [
];
var expected = [
{ locals: {a0: 1.01, b0: 2.02},
{ locals: {i: 0, x0: 3.03, y0: 4.04, a0: 1.01, b0: 2.02},
args: { names: ["i", "x0", "y0"], values: [0, 3.03, 4.04] } },
{ locals: {a1: 3.03, b1: 4.04},
{ locals: {i: 1, x1: 5.05, y1: 6.06, a1: 3.03, b1: 4.04},
args: { names: ["i", "x1", "y1"], values: [1, 5.05, 6.06] } },
{ locals: {a2: 5.05, b2: 6.06},
{ locals: {i: 2, a2: 5.05, b2: 6.06},
args: { names: ["i"], values: [2] } },
{ locals: {a3: 7.07, b3: 8.08},
{ locals: {i: 3, x3: 9.09, y3: 10.10, z3: undefined, a3: 7.07, b3: 8.08},
args: { names: ["i", "x3", "y3", "z3"],
values: [3, 9.09, 10.10, undefined] } },
{ locals: {a4: 9.09, b4: 10.10},
{ locals: {i: 4, x4: 11.11, y4: 12.12, a4: 9.09, b4: 10.10},
args: { names: ["i", "x4", "y4"], values: [4, 11.11, 12.12] } }
];
function arraySum(arr) {
return arr.reduce(function (a, b) { return a + b; }, 0);
}
function listener(event, exec_state, event_data, data) {
try {
if (event == Debug.DebugEvent.Break)
......@@ -81,13 +77,6 @@ function listener(event, exec_state, event_data, data) {
}
assertPropertiesEqual(expected_locals, locals);
// All frames except the bottom one have expected arguments.
for (var j = 0; j < expected_args.names.length; j++) {
assertEquals(expected_args.names[j], frame.argumentName(j));
assertEquals(expected_args.values[j],
frame.argumentValue(j).value());
}
// All frames except the bottom one have two scopes.
assertEquals(3, frame.scopeCount());
assertEquals(debug.ScopeType.Local, frame.scope(0).scopeType());
......@@ -117,22 +106,6 @@ function listener(event, exec_state, event_data, data) {
assertEquals(arg_value, frame.evaluate(arg_name).value());
assertEquals(arg_value, frame.evaluate('arguments['+j+']').value());
}
var expected_args_sum = arraySum(expected_args.values);
var expected_locals_sum =
arraySum(Object.keys(expected_locals).
map(function (k) { return expected_locals[k]; }));
assertEquals(expected_locals_sum + expected_args_sum,
frame.evaluate(Object.keys(expected_locals).join('+') +
' + ' +
expected_args.names.join('+')).value());
var arguments_sum = expected_args.names.map(function(_, idx) {
return "arguments[" + idx + "]";
}).join('+');
assertEquals(expected_args_sum,
frame.evaluate(arguments_sum).value());
} else {
// The bottom frame only have the global scope.
assertEquals(2, frame.scopeCount());
......@@ -142,28 +115,14 @@ function listener(event, exec_state, event_data, data) {
// Check the frame function.
switch (i) {
case 0: assertEquals(h, frame.func().value()); break;
case 1: assertEquals(g3, frame.func().value()); break;
case 2: assertEquals(g2, frame.func().value()); break;
case 3: assertEquals(g1, frame.func().value()); break;
case 4: assertEquals(f, frame.func().value()); break;
case 0: assertEquals("h", frame.func().name()); break;
case 1: assertEquals("g3", frame.func().name()); break;
case 2: assertEquals("g2", frame.func().name()); break;
case 3: assertEquals("g1", frame.func().name()); break;
case 4: assertEquals("f", frame.func().name()); break;
case 5: break;
default: assertUnreachable();
}
// Check for construct call.
if (i == 4) {
assertEquals(testingConstructCall, frame.isConstructCall());
} else if (i == 2) {
assertTrue(frame.isConstructCall());
} else {
assertFalse(frame.isConstructCall());
}
if (i > 4) {
assertFalse(frame.isOptimizedFrame());
assertFalse(frame.isInlinedFrame());
}
}
// Indicate that all was processed.
......
......@@ -45,25 +45,6 @@ function listener(event, exec_state, event_data, data) {
break_count++;
if (break_count == 1) {
Debug.setBreakPoint(g, 3);
for (var i = 0; i < exec_state.frameCount(); i++) {
var frame = exec_state.frame(i);
// When function f is optimized (1 means YES, see runtime.cc) we
// expect an optimized frame for f and g.
if (%GetOptimizationStatus(f) == 1) {
if (i == 1) {
assertTrue(frame.isOptimizedFrame());
assertTrue(frame.isInlinedFrame());
assertEquals(4 - i, frame.inlinedFrameIndex());
} else if (i == 2) {
assertTrue(frame.isOptimizedFrame());
assertFalse(frame.isInlinedFrame());
} else {
assertFalse(frame.isOptimizedFrame());
assertFalse(frame.isInlinedFrame());
}
}
}
}
}
}
......
......@@ -25,7 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug --allow-natives-syntax
Debug = debug.Debug;
var listened = false;
......
......@@ -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
// Test that debug-evaluate only resolves variables that are used by
// the function inside which we debug-evaluate. This is to avoid
......
......@@ -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
Debug = debug.Debug
var exception = null;
......
......@@ -25,10 +25,9 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug --expose-gc --allow-natives-syntax
// Flags: --expose-gc
// Flags: --inline-construct
// Get the Debug object exposed from the debug context global object.
Debug = debug.Debug
var listenerComplete = false;
......@@ -37,22 +36,18 @@ var exception = false;
var testingConstructCall = false;
var expected = [
{ locals: {a0: 1, b0: 2},
{ locals: {i: 0, x0: 3, y0: 4, a0: 1, b0: 2},
args: { names: ["i", "x0", "y0"], values: [0, 3, 4] } },
{ locals: {a1: 3, b1: 4},
{ locals: {i: 1, x1: 5, y1: 6, a1: 3, b1: 4},
args: { names: ["i", "x1", "y1"], values: [1, 5, 6] } },
{ locals: {a2: 5, b2: 6},
{ locals: {i: 2, a2: 5, b2: 6},
args: { names: ["i"], values: [2] } },
{ locals: {a3: 7, b3: 8},
{ locals: {i: 3, x3: 9, y3: 10, z3: undefined, a3: 7, b3: 8},
args: { names: ["i", "x3", "y3", "z3"], values: [3, 9, 10, undefined] } },
{ locals: {a4: 9, b4: 10},
{ locals: {i: 4, x4: 11, y4: 12, a4: 9, b4: 10},
args: { names: ["i", "x4", "y4"], values: [4, 11, 12] } }
];
function arraySum(arr) {
return arr.reduce(function (a, b) { return a + b; }, 0);
}
function listener(event, exec_state, event_data, data) {
try {
if (event == Debug.DebugEvent.Break)
......@@ -72,13 +67,6 @@ function listener(event, exec_state, event_data, data) {
}
assertPropertiesEqual(expected_locals, locals);
// All frames except the bottom one have expected arguments.
for (var j = 0; j < expected_args.names.length; j++) {
assertEquals(expected_args.names[j], frame.argumentName(j));
assertEquals(expected_args.values[j],
frame.argumentValue(j).value());
}
// All frames except the bottom one have three scopes.
assertEquals(3, frame.scopeCount());
assertEquals(debug.ScopeType.Local, frame.scope(0).scopeType());
......@@ -108,22 +96,6 @@ function listener(event, exec_state, event_data, data) {
assertEquals(arg_value, frame.evaluate(arg_name).value());
assertEquals(arg_value, frame.evaluate('arguments['+j+']').value());
}
var expected_args_sum = arraySum(expected_args.values);
var expected_locals_sum =
arraySum(Object.keys(expected_locals).
map(function (k) { return expected_locals[k]; }));
assertEquals(expected_locals_sum + expected_args_sum,
frame.evaluate(Object.keys(expected_locals).join('+') +
' + ' +
expected_args.names.join('+')).value());
var arguments_sum = expected_args.names.map(function(_, idx) {
return "arguments[" + idx + "]";
}).join('+');
assertEquals(expected_args_sum,
frame.evaluate(arguments_sum).value());
} else {
// The bottom frame only have the script scope and the global scope.
assertEquals(2, frame.scopeCount());
......@@ -133,28 +105,14 @@ function listener(event, exec_state, event_data, data) {
// Check the frame function.
switch (i) {
case 0: assertEquals(h, frame.func().value()); break;
case 1: assertEquals(g3, frame.func().value()); break;
case 2: assertEquals(g2, frame.func().value()); break;
case 3: assertEquals(g1, frame.func().value()); break;
case 4: assertEquals(f, frame.func().value()); break;
case 0: assertEquals("h", frame.func().name()); break;
case 1: assertEquals("g3", frame.func().name()); break;
case 2: assertEquals("g2", frame.func().name()); break;
case 3: assertEquals("g1", frame.func().name()); break;
case 4: assertEquals("f", frame.func().name()); break;
case 5: break;
default: assertUnreachable();
}
// Check for construct call.
if (i == 4) {
assertEquals(testingConstructCall, frame.isConstructCall());
} else if (i == 2) {
assertTrue(frame.isConstructCall());
} else {
assertFalse(frame.isConstructCall());
}
if (i > 4) {
assertFalse(frame.isOptimizedFrame());
assertFalse(frame.isInlinedFrame());
}
}
// Indicate that all was processed.
......
......@@ -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
Debug = debug.Debug
......
......@@ -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 --allow-natives-syntax
Debug = debug.Debug
......
......@@ -25,9 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug
// Get the Debug object exposed from the debug context global object.
Debug = debug.Debug
listenerComplete = false;
......
......@@ -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: --allow-natives-syntax --expose-debug-as debug
function dbg(x) {
debugger;
......
......@@ -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 --allow-natives-syntax
Debug = debug.Debug
......
......@@ -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 --allow-natives-syntax
Debug = debug.Debug
......
......@@ -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
Debug = debug.Debug
......
......@@ -25,12 +25,10 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug
// Make sure that the retreival of local variables are performed correctly even
// when an adapter frame is present.
// Get the Debug object exposed from the debug context global object.
Debug = debug.Debug
listenerCalled = false;
......@@ -38,7 +36,8 @@ exception = false;
function checkName(name) {
assertTrue(name == 'a' || name == 'b' || name == 'c');
const validNames = new Set([ 'a', 'b', 'c', 'x', 'y' ]);
assertTrue(validNames.has(name));
}
......
......@@ -25,7 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug
// Test that a variable in the local scope that shadows a context-allocated
// variable is correctly resolved when being evaluated in the debugger.
......
......@@ -25,7 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug
// Test debug evaluation for functions without local context, but with
// nested catch contexts.
......@@ -41,7 +40,6 @@ function f() {
}
};
// Get the Debug object exposed from the debug context global object.
Debug = debug.Debug
function listener(event, exec_state, event_data, data) {
......
......@@ -25,7 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug
// If a function parameter is forced to be context allocated,
// debug evaluate need to resolve it to a context slot instead of
......
......@@ -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
var Debug = debug.Debug;
var exception = null;
......
......@@ -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
Debug = debug.Debug
function overflow() {
......
......@@ -25,7 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug
Debug = debug.Debug;
......
......@@ -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
Debug = debug.Debug;
......
......@@ -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 f() {
for (var i = 10; i < 14; i++) { // 1
......
......@@ -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
var test_y = false;
......
......@@ -25,7 +25,6 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug --allow-natives-syntax
// Flags: --concurrent-recompilation --block-concurrent-recompilation
if (!%IsConcurrentRecompilationSupported()) {
......
......@@ -22,4 +22,23 @@
'debug/debug-stepout-scope-part7': [SKIP],
'debug/debug-stepout-scope-part8': [SKIP],
}], # 'gc_stress == True'
##############################################################################
['variant == turbofan_opt', {
# TODO(mstarzinger): Debugger cannot materialize de-materialized functions.
'debug/regress/regress-crbug-323936': [FAIL],
# TODO(jarin/mstarzinger): Investigate debugger issues with TurboFan.
'debug/debug-evaluate-closure': [FAIL],
}], # variant == turbofan_opt
##############################################################################
['gc_stress == True', {
# Async function tests taking too long
# https://bugs.chromium.org/p/v8/issues/detail?id=5411
'debug/harmony/async-debug-caught-exception-cases0': [SKIP],
'debug/harmony/async-debug-caught-exception-cases1': [SKIP],
'debug/harmony/async-debug-caught-exception-cases2': [SKIP],
'debug/harmony/async-debug-caught-exception-cases3': [SKIP],
}], # 'gc_stress == True'
]
......@@ -119,7 +119,6 @@ class DebugWrapper {
assertFalse(%FunctionIsAPIFunction(func));
// TODO(jgruber): We handle only script breakpoints for now.
// TODO(jgruber): Handle conditions.
const scriptid = %FunctionGetScriptId(func);
assertTrue(scriptid != -1);
......@@ -128,13 +127,17 @@ class DebugWrapper {
const loc =
%ScriptLocationFromLine2(scriptid, opt_line, opt_column, offset);
const params = { location :
{ scriptId : scriptid.toString(),
lineNumber : loc.line,
columnNumber : loc.column,
}};
if (!!opt_condition) {
params.condition = opt_condition;
}
const {msgid, msg} = this.createMessage(
"Debugger.setBreakpoint",
{ location : { scriptId : scriptid.toString(),
lineNumber : loc.line,
columnNumber : loc.column
}
});
"Debugger.setBreakpoint", params);
this.sendMessage(msg);
const reply = this.takeReplyChecked(msgid);
......@@ -237,11 +240,24 @@ class DebugWrapper {
// This is in contrast to the original API, which simply passed object
// mirrors.
execStateScopeObject(obj) {
const {msgid, msg} = this.createMessage(
"Runtime.getProperties", { objectId : obj.objectId });
this.sendMessage(msg);
const reply = this.takeReplyChecked(msgid);
return { value : () => reply.result.result };
const serialized_scope = this.getProperties(obj.objectId);
const scope = {}
const scope_tuples = serialized_scope.forEach((elem) => {
const key = elem.name;
let value;
if (elem.value) {
// Some properties (e.g. with getters/setters) don't have a value.
switch (elem.value.type) {
case "undefined": value = undefined; break;
default: value = elem.value.value; break;
}
}
scope[key] = value;
})
return { value : () => scope };
}
execStateScope(scope) {
......@@ -250,6 +266,70 @@ class DebugWrapper {
};
}
getProperties(objectId) {
const {msgid, msg} = this.createMessage(
"Runtime.getProperties", { objectId : objectId });
this.sendMessage(msg);
const reply = this.takeReplyChecked(msgid);
return reply.result.result;
}
getLocalScopeDetails(frame) {
const scopes = frame.scopeChain;
for (let i = 0; i < scopes.length; i++) {
const scope = scopes[i]
if (scope.type == "local") {
return this.getProperties(scope.object.objectId);
}
}
return undefined;
}
execStateFrameLocalCount(frame) {
const scope_details = this.getLocalScopeDetails(frame);
return scope_details ? scope_details.length : 0;
}
execStateFrameLocalName(frame, index) {
const scope_details = this.getLocalScopeDetails(frame);
if (index < 0 || index >= scope_details.length) return undefined;
return scope_details[index].name;
}
execStateFrameLocalValue(frame, index) {
const scope_details = this.getLocalScopeDetails(frame);
if (index < 0 || index >= scope_details.length) return undefined;
const local = scope_details[index];
let localValue;
switch (local.value.type) {
case "undefined": localValue = undefined; break;
default: localValue = local.value.value; break;
}
return { value : () => localValue };
}
execStateFrameEvaluate(frame, expr) {
const frameid = frame.callFrameId;
const {msgid, msg} = this.createMessage(
"Debugger.evaluateOnCallFrame",
{ callFrameId : frameid,
expression : expr
});
this.sendMessage(msg);
const reply = this.takeReplyChecked(msgid);
const result = reply.result.result;
if (result.subtype == "error") {
throw new Error(result.description);
}
return { value : () => result.value };
}
execStateFrame(frame) {
const scriptid = parseInt(frame.location.scriptId);
const line = frame.location.lineNumber;
......@@ -257,8 +337,12 @@ class DebugWrapper {
const loc = %ScriptLocationFromLine2(scriptid, line, column, 0);
const func = { name : () => frame.functionName };
return { sourceLineText : () => loc.sourceText,
evaluate : (expr) => this.execStateFrameEvaluate(frame, expr),
functionName : () => frame.functionName,
func : () => func,
localCount : () => this.execStateFrameLocalCount(frame),
localName : (ix) => this.execStateFrameLocalName(frame, ix),
localValue: (ix) => this.execStateFrameLocalValue(frame, ix),
scopeCount : () => frame.scopeChain.length,
scope : (index) => this.execStateScope(frame.scopeChain[index]),
allScopes : () => frame.scopeChain.map(
......
// Copyright 2008 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following
// disclaimer in the documentation and/or other materials provided
// with the distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived
// from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --expose-debug-as debug
// Get the Debug object exposed from the debug context global object.
Debug = debug.Debug
listenerComplete = false;
exception = false;
function checkArguments(frame, names, values) {
var argc = Math.max(names.length, values.length);
assertEquals(argc, frame.argumentCount());
for (var i = 0; i < argc; i++) {
if (i < names.length) {
assertEquals(names[i], frame.argumentName(i));
} else {
assertEquals(void 0, frame.argumentName(i));
}
if (i < values.length) {
assertEquals(values[i], frame.argumentValue(i).value());
} else {
assertEquals(void 0, frame.argumentValue(i).value());
}
}
}
function listener(event, exec_state, event_data, data) {
try {
if (event == Debug.DebugEvent.Break)
{
// Frame 0 - called with less parameters than arguments.
checkArguments(exec_state.frame(0), ['x', 'y'], [1]);
// Frame 1 - called with more parameters than arguments.
checkArguments(exec_state.frame(1), ['x', 'y'], [1, 2, 3]);
// Frame 2 - called with same number of parameters than arguments.
checkArguments(exec_state.frame(2), ['x', 'y', 'z'], [1, 2, 3]);
// Indicate that all was processed.
listenerComplete = true;
}
} catch (e) {
exception = e
};
};
// Add the debug event listener.
Debug.setListener(listener);
function h(x, y) {
debugger; // Breakpoint.
};
function g(x, y) {
h(x);
};
function f(x, y, z) {
g.apply(null, [x, y, z]);
};
f(1, 2, 3);
// Make sure that the debug event listener vas invoked.
assertTrue(listenerComplete);
assertFalse(exception, "exception in listener")
......@@ -219,10 +219,6 @@
# Async function tests taking too long
# https://bugs.chromium.org/p/v8/issues/detail?id=5411
'harmony/async-function-debug-scopes': [SKIP],
'harmony/async-debug-caught-exception-cases0': [SKIP],
'harmony/async-debug-caught-exception-cases1': [SKIP],
'harmony/async-debug-caught-exception-cases2': [SKIP],
'harmony/async-debug-caught-exception-cases3': [SKIP],
# TODO(mstarzinger): Takes too long with TF.
'array-sort': [PASS, NO_VARIANTS],
......@@ -239,9 +235,6 @@
# Too slow for gc stress.
'asm/embenchen/box2d': [SKIP],
# Issue 3723.
'regress/regress-3717': [SKIP],
# BUG(v8:4237)
'regress/regress-3976': [SKIP],
......@@ -595,8 +588,6 @@
##############################################################################
['variant == stress', {
'debug-evaluate-locals-optimized': [FAIL],
'debug-evaluate-locals-optimized-double': [FAIL],
'ignition/regress-599001-verifyheap': [SKIP],
'unicode-test': [SKIP],
}], # variant == stress
......@@ -605,20 +596,14 @@
['variant == turbofan_opt', {
# TODO(jarin/mstarzinger): Investigate debugger issues with TurboFan.
'debug-evaluate-closure': [FAIL],
'debug-evaluate-locals': [FAIL],
'debug-set-variable-value': [FAIL],
'debug-evaluate-locals-optimized': [FAIL],
'debug-evaluate-locals-optimized-double': [FAIL],
'debug-liveedit-double-call': [FAIL],
'es6/debug-evaluate-blockscopes': [FAIL],
# TODO(jgruber): Fails in --turbo --always-opt mode.
'regress/regress-105': [FAIL],
# TODO(mstarzinger): Debugger cannot materialize de-materialized functions.
'regress/regress-crbug-323936': [FAIL],
# Too slow.
'big-object-literal': [SKIP],
'ignition/regress-599001-verifyheap': [SKIP],
......
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