Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1019)

Issue 240213004: Fixes a problem with the recovery of contexts in the debugger at closure calls. (Closed)

Created:
6 years, 8 months ago by turnidge
Modified:
6 years, 8 months ago
Reviewers:
Cutch
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Fixes a problem with the recovery of contexts in the debugger at closure calls. When we call a closure, the caller saves the context before the call. So when walking the stack, we used to check the callee activation to see if it was a closure call, and then recover our caller-saved context. This breaks down in the following case: 1. Caller calls function F. 2. Function F is compiled. 3. The compiler needs to run code to evaluate a constant (e.g. a static final getter). 4. We hit a breakpoint *while* evaluating the constant. In this case, there is no callee frame for the closure call yet. I fix this by using the the pc descriptors to see if the current pc in the caller is a closure call. This avoids needing to have a callee frame available. --- ALSO: New flags: --verify-incoming-contexts: in development - verify assumptions about contexts in stub code. (currently ia32 only) --trace-debugger-stacktrace: this helps debug these kinds of stacktrace issues. Miscellaneous improvements to frame and context printing. BUG= R=johnmccutchan@google.com Committed: https://code.google.com/p/dart/source/detail?r=35130

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+266 lines, -32 lines) Patch
M runtime/vm/debugger.h View 1 chunk +5 lines, -0 lines 0 comments Download
M runtime/vm/debugger.cc View 12 chunks +133 lines, -17 lines 0 comments Download
M runtime/vm/object.h View 2 chunks +5 lines, -0 lines 0 comments Download
M runtime/vm/object.cc View 3 chunks +44 lines, -11 lines 0 comments Download
M runtime/vm/stack_frame.h View 1 chunk +1 line, -2 lines 0 comments Download
M runtime/vm/stack_frame.cc View 1 chunk +24 lines, -2 lines 0 comments Download
M runtime/vm/stub_code_ia32.cc View 5 chunks +54 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
turnidge
6 years, 8 months ago (2014-04-16 19:47:19 UTC) #1
Cutch
lgtm
6 years, 8 months ago (2014-04-16 19:50:16 UTC) #2
turnidge
6 years, 8 months ago (2014-04-16 20:03:36 UTC) #3
Message was sent while issue was closed.
Committed patchset #2 manually as r35130 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698