[M] Change in dart/sdk[main]: [vm] Change how the debugger skips the same position after breakpoints.

0 views
Skip to first unread message

Tess Strickland (Gerrit)

unread,
Jan 20, 2026, 11:17:29 AM (2 days ago) Jan 20
to Alexander Markov, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Alexander Markov

Tess Strickland added 1 comment

Patchset-level comments
File-level comment, Patchset 23 (Latest):
Tess Strickland . resolved

Going ahead and sending for you to look at. There is one failure on ARM64 but not on X64, interestingly enough, and it happens with both compiled code and bytecode, which is also interesting as I thought it'd be only compiled code as I'd assume it was due to differences in how compiled code is generated on those two architectures. (At least I assume it's ARM64 vs. X64 since the failures were on Mac ARM64 and the successes were on Linux X64/Windows X64, so also throwing Windows ARM64 at it to see if that succeeds or fails.)

I'll look into it, but in the meantime I think it's worth a pass to see if you have any comments about its current state.

Open in Gerrit

Related details

Attention is currently required from:
  • Alexander Markov
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ic897d7bea382589751777f4db39aa58bf9525604
Gerrit-Change-Number: 474340
Gerrit-PatchSet: 23
Gerrit-Owner: Tess Strickland <sstr...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Alexander Markov <alexm...@google.com>
Gerrit-Comment-Date: Tue, 20 Jan 2026 16:17:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Alexander Markov (Gerrit)

unread,
Jan 20, 2026, 11:25:40 AM (2 days ago) Jan 20
to Tess Strickland, Alexander Markov, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org
Attention needed from Tess Strickland

Alexander Markov voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Tess Strickland
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ic897d7bea382589751777f4db39aa58bf9525604
Gerrit-Change-Number: 474340
Gerrit-PatchSet: 23
Gerrit-Owner: Tess Strickland <sstr...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Tess Strickland <sstr...@google.com>
Gerrit-Attention: Tess Strickland <sstr...@google.com>
Gerrit-Comment-Date: Tue, 20 Jan 2026 16:25:35 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Tess Strickland (Gerrit)

unread,
Jan 21, 2026, 9:58:27 AM (14 hours ago) Jan 21
to Alexander Markov, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org

Tess Strickland added 1 comment

Patchset-level comments
Tess Strickland . resolved

Going ahead and sending for you to look at. There is one failure on ARM64 but not on X64, interestingly enough, and it happens with both compiled code and bytecode, which is also interesting as I thought it'd be only compiled code as I'd assume it was due to differences in how compiled code is generated on those two architectures. (At least I assume it's ARM64 vs. X64 since the failures were on Mac ARM64 and the successes were on Linux X64/Windows X64, so also throwing Windows ARM64 at it to see if that succeeds or fails.)

I'll look into it, but in the meantime I think it's worth a pass to see if you have any comments about its current state.

Tess Strickland

For the record, this was coincidence; the real problem is that the last stepping information was set from the breakpoint location after handling the stepping request, but the breakpoint was disabled before the next stepping request which caused a race condition where the breakpoint location may or may not might be invalidated when the last stepping information was set.

That means we need to set the last stepping information _before_ calling `HandleSteppingRequest`, which now we do. This means no clearing the last stepping information as a side effect of handling a stepping request, as it needs to be kept across that call, which was the case previously and fine to go back to.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ic897d7bea382589751777f4db39aa58bf9525604
Gerrit-Change-Number: 474340
Gerrit-PatchSet: 24
Gerrit-Owner: Tess Strickland <sstr...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Tess Strickland <sstr...@google.com>
Gerrit-Comment-Date: Wed, 21 Jan 2026 14:58:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Tess Strickland <sstr...@google.com>
satisfied_requirement
open
diffy

Tess Strickland (Gerrit)

unread,
Jan 21, 2026, 12:48:10 PM (11 hours ago) Jan 21
to Alexander Markov, Commit Queue, rev...@dartlang.org, vm-...@dartlang.org

Tess Strickland voted Commit-Queue+2

Commit-Queue+2
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedCommit-Message-Has-TEST
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ic897d7bea382589751777f4db39aa58bf9525604
Gerrit-Change-Number: 474340
Gerrit-PatchSet: 26
Gerrit-Owner: Tess Strickland <sstr...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Tess Strickland <sstr...@google.com>
Gerrit-Comment-Date: Wed, 21 Jan 2026 17:48:04 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Commit Queue (Gerrit)

unread,
Jan 21, 2026, 12:48:28 PM (11 hours ago) Jan 21
to Tess Strickland, Alexander Markov, rev...@dartlang.org, vm-...@dartlang.org

Commit Queue submitted the change with unreviewed changes

Unreviewed changes

23 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: runtime/vm/debugger.cc
Insertions: 14, Deletions: 6.

The diff is too large to show. Please review the diff.
```
```
The name of the file: runtime/vm/debugger.h
Insertions: 1, Deletions: 0.

The diff is too large to show. Please review the diff.
```

Change information

Commit message:
[vm] Change how the debugger skips the same position after breakpoints.

Previously, the debugger used a boolean "skip next step" field that was
set when a breakpoint was hit. In compiled code, not skipping the next
step would cause a redundant pause to be emitted after a breakpoint, and
so that field caused the next run of PauseStepping to reset it to false
and then continue single stepping without the redundant pause.

However, skipping only the next call to PauseStepping isn't enough
when debugging bytecode. For bytecode, single stepping is performed on
each bytecode instruction and so there may be multiple instructions after a breakpoint until a new token position is reached.

Instead, remove the field and generalize the case being avoided by
recording the token position that should be ignored and single
stepping until the token position changes. This is done by recording
a real last_stepping_pos_ with a last_stepping_fp_ of 0, which now
means to skip any possible pauses until the token position changes.

Doing this means that in each case where there are possible skips to
be performed (skipping the same fp/pos after a pause, skipping the
pos after a breakpoint, skipping the await fp/pos after a resumption),
all such skips are handled via a single unified mechanism.

This CL also reworks the kStepOut behavior so that it steps into
the awaiter closest to the highest debuggable frame on the stack if
there is one, not just the first awaiter even if there are no
debuggable frames between that awaiter and the next.

TEST=pkg/vm_service/test/vm_timeline_flags
Cq-Include-Trybots: luci.dart.try:vm-dyn-linux-debug-x64-try,vm-dyn-mac-debug-arm64-try
Change-Id: Ic897d7bea382589751777f4db39aa58bf9525604
Reviewed-by: Alexander Markov <alexm...@google.com>
Commit-Queue: Tess Strickland <sstr...@google.com>
Files:
  • M pkg/vm_service/test/vm_timeline_flags_test.dart
  • M runtime/vm/debugger.cc
  • M runtime/vm/debugger.h
Change size: M
Delta: 3 files changed, 101 insertions(+), 96 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Alexander Markov
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ic897d7bea382589751777f4db39aa58bf9525604
Gerrit-Change-Number: 474340
Gerrit-PatchSet: 27
Gerrit-Owner: Tess Strickland <sstr...@google.com>
Gerrit-Reviewer: Alexander Markov <alexm...@google.com>
Gerrit-Reviewer: Tess Strickland <sstr...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages