Skip to content

Commit 3633b8e

Browse files
authored
Merge pull request #869 from Unity-Technologies/unity-master-sync-il2cpp
Sync debugger changes from IL2CPP
2 parents c328a85 + 374a152 commit 3633b8e

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

mono/metadata/il2cpp-compat-metadata.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#pragma once
22

3-
#ifdef IL2CPP_MONO_DEBUGGER
3+
#ifdef RUNTIME_IL2CPP
44

55
#include <mono/sgen/sgen-conf.h>
66
#include <mono/metadata/mono-gc.h>
@@ -33,4 +33,4 @@ void* il2cpp_mono_gc_invoke_with_gc_lock (MonoGCLockedCallbackFunc func, void *d
3333
int il2cpp_mono_gc_pthread_create (pthread_t *new_thread, const pthread_attr_t *attr, void *(*start_routine)(void *), void *arg);
3434
#endif
3535

36-
#endif
36+
#endif

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);

mono/mini/il2cpp-stubs.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,7 +1505,11 @@ char* il2cpp_assembly_get_full_name(MonoAssembly *assembly)
15051505

15061506
const MonoMethod* il2cpp_get_seq_point_method(Il2CppSequencePoint *seqPoint)
15071507
{
1508+
#if IL2CPP_MONO_DEBUGGER
15081509
return il2cpp::utils::Debugger::GetSequencePointMethod(seqPoint);
1510+
#else
1511+
return NULL;
1512+
#endif
15091513
}
15101514

15111515
const MonoClass* il2cpp_get_class_from_index(int index)

0 commit comments

Comments
 (0)