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

Issue 805573003: Fix debugging of async code (Closed)

Created:
6 years ago by hausner
Modified:
6 years ago
Reviewers:
Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org, sethladd
Visibility:
Public.

Description

Fix debugging of async code Make sure the debugger finds the closure function containing the body of async functions, but not the synthetic function that generates the future. Change the way the debugger sets one-time breakpoints. Instead of compiling the function and instrumenting all safe-points, set a breakpoint marked as “one-shot” at the beginning of the function and wait until the function is compiled. Then, once it fires, it gets automatically deleted. Finally, be smarter how we resolve breakpoints in compiled code. The compiler rearranges code in await expressions, which tripped up the debugger. This change makes sure we select the lowest compiled code address only within the line containing the requested breakpoint position. R=iposva@google.com Committed: https://code.google.com/p/dart/source/detail?r=42368

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -95 lines) Patch
M runtime/vm/debugger.h View 1 3 chunks +4 lines, -1 line 0 comments Download
M runtime/vm/debugger.cc View 1 9 chunks +60 lines, -80 lines 0 comments Download
M runtime/vm/parser.cc View 1 9 chunks +10 lines, -13 lines 0 comments Download
M tests/standalone/debugger/breakpoint_resolved_test.dart View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (1 generated)
hausner
6 years ago (2014-12-13 00:59:33 UTC) #2
Ivan Posva
LGTM -Ivan https://codereview.chromium.org/805573003/diff/1/runtime/vm/debugger.cc File runtime/vm/debugger.cc (right): https://codereview.chromium.org/805573003/diff/1/runtime/vm/debugger.cc#newcode1417 runtime/vm/debugger.cc:1417: // First pass: find the lowest token ...
6 years ago (2014-12-15 16:36:54 UTC) #3
hausner
Committed patchset #2 (id:20001) manually as r42368 (presubmit successful).
6 years ago (2014-12-15 18:20:25 UTC) #4
hausner
6 years ago (2014-12-15 18:21:46 UTC) #5
Message was sent while issue was closed.
https://codereview.chromium.org/805573003/diff/1/runtime/vm/debugger.cc
File runtime/vm/debugger.cc (right):

https://codereview.chromium.org/805573003/diff/1/runtime/vm/debugger.cc#newco...
runtime/vm/debugger.cc:1417: // First pass: find the lowest token position
within the given range.
On 2014/12/15 16:36:54, Ivan Posva wrote:
> What you are looking for here is the lowest breakpointable token position,
> correct? It was not necessarily clear from the comment.

Yes. I clarified the comments.

Powered by Google App Engine
This is Rietveld 408576698