v8/test/debugger/debug
kozyatinskiy e27d18c943 [debugger] tuned StepNext and StepOut at return position
Proposed behaviour:
- StepNext at return position go into next function call (no changes with current behavior, but implemented in v8::Debug instead of hack on inspector side);
- StepOut at return position go into next non-current function call.

We need this to have better stepping in cases with native functions, blackboxed functions and/or different embedder calls (e.g. event listeners).

New behavior could be illustrated with two examples (for more see stepping-with-natives-and-frameworks test):
- let's assume that we've blackboxed callAll function, this function just takes its arguments and call one after another:
var foo = () => 1;
callAll(foo, foo, () => 2);
If we break inside of first call of function foo. Then on..
..StepNext - we're able to reach second call of function foo,
..StepOut - we're able to reach () => 2 call.

- let's consider case with native function:
[1,2,3].map(x => x * 2)
If we break inside of first callback call, then with StepNext we can iterate through all calls of callback, with StepOut we go to next statement after .map call.

Implementation details:
- when we request break we schedule step-in function call for any step action at return position and for step-in at any position,
- when we request StepOut at return position - we mark current function as needed-to-be-ignored inside of PrepareStepIn(function) call,
- when we request StepOut at not return position - we set break at return position and ask debugger to just repeat last step action on next stepping-related break.

Design doc: https://docs.google.com/document/d/1ihXHOIhP_q-fJCA0e2EiXz_Zr3B08KMjaPifcaqZ60Q/edit

BUG=v8:6118,chromium:583193
R=dgozman@chromium.org,yangguo@chromium.org

Review-Url: https://codereview.chromium.org/2758483002
Cr-Commit-Position: refs/heads/master@{#44028}
2017-03-22 14:16:18 +00:00
..
compiler [debug-wrapper] Adapt tests, breakpoint.actual_location 2016-11-21 09:29:17 +00:00
es6 [debugger] tuned StepNext and StepOut at return position 2017-03-22 14:16:18 +00:00
es8 [debug] Add exception predictions to builtins where missing. 2017-03-10 17:44:51 +00:00
harmony Remove --harmony-async-await runtime flag 2017-01-10 23:27:02 +00:00
ignition [complier] Enable parallel eager inner function compilation with compiler dispatcher. 2017-01-25 22:41:57 +00:00
regress [debugger] remove debugger statement support from FCG/CS. 2017-02-22 08:45:09 +00:00
wasm [wasm] Enforce that function bodies end with the \"end\" opcode. 2017-01-15 21:18:53 +00:00
debug-allscopes-on-debugger.js [debugger] Basic scope functionality and exception events in wrapper 2016-11-08 14:54:10 +00:00
debug-backtrace.js [debug-wrapper] migrate some scope related tests 2016-12-14 07:20:33 +00:00
debug-break-inline.js [debug-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
debug-break-native.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
debug-breakpoints.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
debug-clearbreakpoint.js [debug-wrapper] migrate some scope related tests 2016-12-14 07:20:33 +00:00
debug-compile-event.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
debug-compile-optimized.js [tests] Cleanup tests that use assertOptimized()/assertUnoptimized(). 2017-01-26 17:39:09 +00:00
debug-conditional-breakpoints.js [debug-wrapper] Migrate more tests 2016-11-22 12:44:18 +00:00
debug-constructor.js [debugger] Stepping and break-related functions in wrapper 2016-11-08 13:54:37 +00:00
debug-enable-disable-breakpoints.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
debug-eval-scope.js [debug] Add Eval scope type to inspector protocol 2016-11-23 07:30:23 +00:00
debug-evaluate-bool-constructor.js [debug-wrapper] migrate some scope related tests 2016-12-14 07:20:33 +00:00
debug-evaluate-closure.js [debugger] remove debugger statement support from FCG/CS. 2017-02-22 08:45:09 +00:00
debug-evaluate-declaration.js [debug-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
debug-evaluate-locals-capturing.js [debug-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
debug-evaluate-locals-optimized-double.js [debug] Add Eval scope type to inspector protocol 2016-11-23 07:30:23 +00:00
debug-evaluate-locals-optimized.js [debug-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
debug-evaluate-locals.js [debug-wrapper] Adapt tests, breakpoint.actual_location 2016-11-21 09:29:17 +00:00
debug-evaluate-modify-catch-block-scope.js [debug-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
debug-evaluate-modify-this.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-evaluate-nested-let.js [tests] Cleanup tests that use assertOptimized()/assertUnoptimized(). 2017-01-26 17:39:09 +00:00
debug-evaluate-no-side-effect-async.js [Flags] Add negation implications for --turbo negative so --no-turbo works. 2017-03-07 20:41:12 +00:00
debug-evaluate-no-side-effect-builtins-2.js [debug] extend debug-evaluate to Date, Boolean, global functions. 2017-03-18 08:45:57 +00:00
debug-evaluate-no-side-effect-builtins.js [debug] extend debug-evaluate to Date, Boolean, global functions. 2017-03-18 08:45:57 +00:00
debug-evaluate-no-side-effect-control.js [Flags] Add negation implications for --turbo negative so --no-turbo works. 2017-03-07 20:41:12 +00:00
debug-evaluate-no-side-effect-iife.js [Flags] Add negation implications for --turbo negative so --no-turbo works. 2017-03-07 20:41:12 +00:00
debug-evaluate-no-side-effect-ops.js [debug] extend debug-evaluate to Date, Boolean, global functions. 2017-03-18 08:45:57 +00:00
debug-evaluate-no-side-effect.js [Flags] Add negation implications for --turbo negative so --no-turbo works. 2017-03-07 20:41:12 +00:00
debug-evaluate-shadowed-context-2.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-evaluate-shadowed-context.js [debug-wrapper] Migrate more tests 2016-11-22 12:44:18 +00:00
debug-evaluate-with.js [ignition/turbo] Perform liveness analysis on the bytecodes 2016-11-29 12:27:15 +00:00
debug-evaluate.js [debug-wrapper] migrate some scope related tests 2016-12-14 07:20:33 +00:00
debug-event-listener.js [debug-wrapper] Add caught/uncaught to exception pauses 2016-11-10 09:05:29 +00:00
debug-exceptions.js [debug-wrapper] Add caught/uncaught to exception pauses 2016-11-10 09:05:29 +00:00
debug-function-scopes.js [debug-wrapper] Migrate more tests 2016-11-22 12:44:18 +00:00
debug-generator-break-on-stack.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-generator-break.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-liveedit-1.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-liveedit-2.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-liveedit-3.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-liveedit-4.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-liveedit-check-stack.js [liveedit] reimplement frame restarting. 2017-01-27 07:31:03 +00:00
debug-liveedit-compile-error.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-liveedit-diff.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-liveedit-double-call.js Count closures using the feedback vector cell map, specialize if count==1. 2017-02-10 15:19:19 +00:00
debug-liveedit-exceptions.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-liveedit-literals.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-liveedit-newsource.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-liveedit-patch-positions-replace.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-liveedit-replace-code.js [liveedit] reimplement frame restarting. 2017-01-27 07:31:03 +00:00
debug-liveedit-restart-frame.js [ignition/turbo] Perform liveness analysis on the bytecodes 2016-11-29 12:27:15 +00:00
debug-liveedit-stack-padding.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-liveedit-stepin.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-liveedit-utils.js [debug-wrapper] LiveEdit, frame.restart(), breakpoints 2016-11-17 08:43:59 +00:00
debug-materialized.js [debug-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
debug-multiple-breakpoints.js [debug-wrapper] Migrate more tests 2016-11-22 12:44:18 +00:00
debug-multiple-var-decl.js [debug-wrapper] Further extend the debug wrapper 2016-11-16 08:34:44 +00:00
debug-negative-break-points.js [debug-wrapper] Migrate more tests 2016-11-22 12:44:18 +00:00
debug-optimize.js [tests] Cleanup tests that use assertOptimized()/assertUnoptimized(). 2017-01-26 17:39:09 +00:00
debug-print.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-receiver.js [debug-wrapper] Migrate more tests 2016-11-22 12:44:18 +00:00
debug-return-value.js [debug-wrapper] migrate some scope related tests 2016-12-14 07:20:33 +00:00
debug-scopes-suspended-generators.js [Flags] Add negation implications for --turbo negative so --no-turbo works. 2017-03-07 20:41:12 +00:00
debug-scopes.js [debug-wrapper] migrate some scope related tests 2016-12-14 07:20:33 +00:00
debug-script.js [inspector] make console.assert much faster 2016-11-23 17:09:50 +00:00
debug-set-variable-value.js [debugger] remove debugger statement support from FCG/CS. 2017-02-22 08:45:09 +00:00
debug-setbreakpoint.js [debug-wrapper] migrate some scope related tests 2016-12-14 07:20:33 +00:00
debug-sourceinfo.js [debug-wrapper] clearAllBreakPoints and several scripts functions 2016-11-17 09:34:18 +00:00
debug-stack-check-position.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-step-2.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-step-3.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-step-4.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-step-end-of-script.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-step-into-json.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-step-into-valueof.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-step-stub-callfunction.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-step-turbofan.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-step.js [debugger] correctly annotate scripts with debug id. 2017-03-13 09:13:43 +00:00
debug-stepin-accessor-ic.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepin-accessor.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepin-builtin-callback-opt.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepin-builtin-callback.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepin-builtin.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepin-call-function-stub.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepin-construct-call.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepin-constructor.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepin-foreach.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepin-function-call.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepin-property-function-call.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepnext-do-while.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepout-recursive-function.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepout-scope-part1.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepout-scope-part2.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepout-scope-part3.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepout-scope-part4.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepout-scope-part5.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepout-scope-part6.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepout-scope-part7.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepout-scope-part8.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
debug-stepout-to-builtin.js [debugger] Further stepping support in test wrapper 2016-11-07 12:25:24 +00:00
for-in-opt.js [debugger] Migrate more debugger tests to inspector 2016-11-08 10:39:08 +00:00
function-source.js [debug-wrapper] clearAllBreakPoints and several scripts functions 2016-11-17 09:34:18 +00:00
regress-3225.js [debug-wrapper] Conditional breaks, locals, evaluate, scopes 2016-11-11 12:08:34 +00:00
regress-5207.js [ignition/turbo] Perform liveness analysis on the bytecodes 2016-11-29 12:27:15 +00:00