• yangguo's avatar
    [debugger] fix debug-evaluate wrt shadowed context var. · 089edbfa
    yangguo authored
    Debug-evaluate used to resolve stack variables that shadow
    context variables incorrectly, since the stack variable is
    not visible in the context chain.
    
    To fix this, we limit local variables accessible by debug-
    evaluate to the ones directly referenced inside the function.
    What is not referenced by the function itself, is considered
    optimized out and not accessible by debug-evaluate.
    
    To achieve this, we duplicate the entire context chain up to
    the native context, and write back changes after debug-
    evaluate. Changes to the original context chain will however
    be overwritten. This already happens for catch and block
    scopes though.
    
    Also fix a crash caused by declaring variables inside debug-
    evaluate.
    
    R=mstarzinger@chromium.org
    BUG=v8:4593
    LOG=N
    
    Review URL: https://codereview.chromium.org/1500933002
    
    Cr-Commit-Position: refs/heads/master@{#32828}
    089edbfa
Name
Last commit
Last update
..
arm Loading commit data...
arm64 Loading commit data...
ia32 Loading commit data...
mips Loading commit data...
mips64 Loading commit data...
ppc Loading commit data...
x64 Loading commit data...
x87 Loading commit data...
OWNERS Loading commit data...
debug-evaluate.cc Loading commit data...
debug-evaluate.h Loading commit data...
debug-frames.cc Loading commit data...
debug-frames.h Loading commit data...
debug-scopes.cc Loading commit data...
debug-scopes.h Loading commit data...
debug.cc Loading commit data...
debug.h Loading commit data...
debug.js Loading commit data...
liveedit.cc Loading commit data...
liveedit.h Loading commit data...
liveedit.js Loading commit data...
mirrors.js Loading commit data...