Skip to content

Commit 374a152

Browse files
committed
Sync changes from IL2CPP 7071db69fe79c82b32c928e94c61b8af145e7697
Fix for case 1011160: Step Out from an Update function behaves incorrectly. If we are stepping out of the only managed frame in the call stack, cancel creating the step request and just continue.
1 parent b6daf20 commit 374a152

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

mono/mini/debugger-agent.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9134,6 +9134,21 @@ event_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
91349134
return err;
91359135
}
91369136

9137+
#if RUNTIME_IL2CPP
9138+
{
9139+
DebuggerTlsData* tls;
9140+
mono_loader_lock();
9141+
tls = (DebuggerTlsData *)mono_g_hash_table_lookup(thread_to_tls, THREAD_TO_INTERNAL(step_thread));
9142+
mono_loader_unlock();
9143+
9144+
if (tls->il2cpp_context.frameCount == 1 && depth == STEP_DEPTH_OUT)
9145+
{
9146+
g_free(req);
9147+
return ERR_NONE;
9148+
}
9149+
}
9150+
#endif
9151+
91379152
err = ss_create (THREAD_TO_INTERNAL (step_thread), size, depth, filter, req);
91389153
if (err != ERR_NONE) {
91399154
g_free (req);

0 commit comments

Comments
 (0)