Skip to content

Commit 448f290

Browse files
committed
Sync IL2CPP change from 4607d96d9f45cf7cb296f2673f249778e71dd65f Get locals for a method with no locals
1 parent 8f2f3b1 commit 448f290

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

mono/mini/debugger-agent.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10262,8 +10262,16 @@ static void GetExecutionContextAndHeaderInfo(MonoMethod* method, uint32_t* execu
1026210262
if (il2cpp_mono_methods_match(il2cpp_get_seq_point_method(seqPoint), method))
1026310263
{
1026410264
Il2CppMethodExecutionContextInfoIndex *index = &g_il2cpp_metadata->methodExecutionContextInfoIndexes[seqPoint->methodIndex];
10265-
*executionContextInfoCount = index->count;
10266-
*executionContextInfo = &g_il2cpp_metadata->methodExecutionContextInfos[index->tableIndex][index->startIndex];
10265+
if (index->count != -1)
10266+
{
10267+
*executionContextInfoCount = index->count;
10268+
*executionContextInfo = &g_il2cpp_metadata->methodExecutionContextInfos[index->tableIndex][index->startIndex];
10269+
}
10270+
else
10271+
{
10272+
*executionContextInfoCount = 0;
10273+
*executionContextInfo = NULL;
10274+
}
1026710275
*headerInfo = &g_il2cpp_metadata->methodHeaderInfos[seqPoint->methodIndex];
1026810276
*scopes = &g_il2cpp_metadata->methodScopes[(*headerInfo)->startScope];
1026910277
return;
@@ -10528,7 +10536,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g
1052810536
g_free (locals_map);
1052910537
#else
1053010538
uint32_t executionInfoCount, localVariableCount = 0, i;
10531-
const Il2CppMethodExecutionContextInfo* executionContextInfo;
10539+
const Il2CppMethodExecutionContextInfo* executionContextInfo = NULL;
1053210540
const Il2CppMethodHeaderInfo* headerInfo;
1053310541
const Il2CppMethodScope* scopes;
1053410542

0 commit comments

Comments
 (0)