Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/mono/mono/mini/debugger-engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -1323,8 +1323,11 @@ mono_de_ss_start (SingleStepReq *ss_req, SingleStepArgs *ss_args)
} else {
frame_index = 1;

#ifndef TARGET_WASM
Comment thread
radical marked this conversation as resolved.
if (ss_args->ctx && !frames) {

#else
if (!frames) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this causing the issue with the test? Why did it specifically break the async test?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because once it doesn't execute ss_calculate_framecount because ss_args->ctx == NULL, nframes variable would be 0, and wouldn't enter in this if: if (asyncMethod && asyncMethod->num_awaits && nframes && rt_callbacks.ensure_jit (frames [0])) { and wouldn't call ss_bp_add_one

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. nframes ==0 would also cause the loop starting line 1341 to get skipped, IIUC. Is there any case where that loop will get incorrectly skipped?catch`(not the last one, IIUC) in an async method? Or catch in non-async methods?

Just trying to understand with silly/naive questions 😬

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this loop would be skipped wrongly without the fix. Now the value of nframes and frames variables will be correct for both loops, line 1341 and line 1358.

#endif
mono_loader_lock ();
locked = TRUE;

Expand Down
6 changes: 2 additions & 4 deletions src/mono/wasm/debugger/DebuggerTestSuite/SteppingTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -903,8 +903,7 @@ await EvaluateAndCheck(
});
}

// [Fact]
// [ActiveIssue("https://github.com/dotnet/runtime/issues/42424")]
[Fact]
public async Task BreakOnAwaitThenStepOverToNextAwaitCall()
{
var insp = new Inspector();
Expand All @@ -927,8 +926,7 @@ await EvaluateAndCheck(
});
}

// [Fact]
// [ActiveIssue("https://github.com/dotnet/runtime/issues/42424")]
[Fact]
public async Task BreakOnAwaitThenStepOverToNextLine()
{
var insp = new Inspector();
Expand Down