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

Issue 17846009: Better single stepping in VM debugger (Closed)

Created:
7 years, 6 months ago by hausner
Modified:
7 years, 2 months ago
Reviewers:
siva, Ivan Posva
CC:
reviews_dartlang.org, devoncarew
Visibility:
Public.

Description

Better single stepping in VM debugger Single stepping now steps into the next dart code that the user is interested in, including from one asynchronous task to the next. R=asiva@google.com Committed: https://code.google.com/p/dart/source/detail?r=24632

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Total comments: 12

Patch Set 5 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+322 lines, -114 lines) Patch
M runtime/vm/code_generator.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/code_generator.cc View 1 2 3 4 2 chunks +12 lines, -3 lines 0 comments Download
M runtime/vm/dart_entry.cc View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M runtime/vm/debugger.h View 1 2 3 4 6 chunks +15 lines, -7 lines 0 comments Download
M runtime/vm/debugger.cc View 1 2 3 4 10 chunks +118 lines, -100 lines 0 comments Download
M runtime/vm/debugger_api_impl.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M runtime/vm/isolate.h View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M runtime/vm/isolate.cc View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M runtime/vm/stub_code_arm.cc View 1 2 3 4 3 chunks +37 lines, -0 lines 0 comments Download
M runtime/vm/stub_code_ia32.cc View 1 2 3 4 3 chunks +40 lines, -0 lines 0 comments Download
M runtime/vm/stub_code_mips.cc View 1 2 3 4 3 chunks +45 lines, -0 lines 0 comments Download
M runtime/vm/stub_code_x64.cc View 1 2 3 4 3 chunks +37 lines, -0 lines 0 comments Download
M tests/standalone/standalone.status View 1 2 3 4 1 chunk +1 line, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
hausner
7 years, 5 months ago (2013-06-27 15:50:47 UTC) #1
hausner
Ok, this is ready now for a review.
7 years, 5 months ago (2013-06-28 18:31:06 UTC) #2
siva
LGTM. https://codereview.chromium.org/17846009/diff/25002/runtime/vm/debugger.cc File runtime/vm/debugger.cc (right): https://codereview.chromium.org/17846009/diff/25002/runtime/vm/debugger.cc#newcode1599 runtime/vm/debugger.cc:1599: } I might have asked this question before, ...
7 years, 5 months ago (2013-07-01 17:04:48 UTC) #3
hausner
Committed patchset #5 manually as r24632 (presubmit successful).
7 years, 5 months ago (2013-07-01 17:29:29 UTC) #4
hausner
7 years, 4 months ago (2013-08-09 09:59:02 UTC) #5
Message was sent while issue was closed.
Ahem.

https://codereview.chromium.org/17846009/diff/25002/runtime/vm/debugger.cc
File runtime/vm/debugger.cc (right):

https://codereview.chromium.org/17846009/diff/25002/runtime/vm/debugger.cc#ne...
runtime/vm/debugger.cc:1599: }
On 2013/07/01 17:04:48, siva wrote:
> I might have asked this question before, how does this work when one is
> currently in a function and is trying to step out or step over a recursive
> invocation of the same function that we are currently stopped in.

Stepping out of a function works by setting temporary breakpoints in the caller,
then resume. In the case of recursive calls, this is indeed not a very good
solution since the function that gets instrumented with temp breakpoints is the
same function we're currently stopped in.

I could walk the stack and instrument the first function that is different from
the current function. But that would not allow the user to step out one
recursive activation frame at a time.

Maybe we can discuss this offline again.

https://codereview.chromium.org/17846009/diff/25002/runtime/vm/debugger.h
File runtime/vm/debugger.h (right):

https://codereview.chromium.org/17846009/diff/25002/runtime/vm/debugger.h#new...
runtime/vm/debugger.h:272: bool IsStepping() { return resume_action_ !=
kContinue; }
On 2013/07/01 17:04:48, siva wrote:
> const

Done.

https://codereview.chromium.org/17846009/diff/25002/runtime/vm/debugger.h#new...
runtime/vm/debugger.h:348: ActivationFrame* TopDartFrame();
On 2013/07/01 17:04:48, siva wrote:
> const

Done. A number of debugger methods modify the debugger object by caching
something as a side effect, so I didn't care much about 'constness'.

https://codereview.chromium.org/17846009/diff/25002/runtime/vm/stub_code_arm.cc
File runtime/vm/stub_code_arm.cc (right):

https://codereview.chromium.org/17846009/diff/25002/runtime/vm/stub_code_arm....
runtime/vm/stub_code_arm.cc:1641: __ Bind(&not_stepping);
On 2013/07/01 17:04:48, siva wrote:
> why not abstract this into a private function
> StubCode::CheckForSingleStepping(Register tmp, bool preserve_ic_data);
> Would avoid code duplication.
> 
> Here and in the other targets too.

I'll do that in a separate checkin once I add more places where we do this
check. Good idea.

https://codereview.chromium.org/17846009/diff/25002/tests/standalone/standalo...
File tests/standalone/standalone.status (right):

https://codereview.chromium.org/17846009/diff/25002/tests/standalone/standalo...
tests/standalone/standalone.status:157: 
On 2013/07/01 17:04:48, siva wrote:
> Why is  out_of_memory_test related to this change.

I can't explain that :) I just found that these tests are no longer crashing on
my system.

https://codereview.chromium.org/17846009/diff/25002/tests/standalone/standalo...
tests/standalone/standalone.status:165: 
On 2013/07/01 17:04:48, siva wrote:
> What is this extra line for?

I get paid by the number of lines added :)

Removed.

Powered by Google App Engine
This is Rietveld 408576698