Skip to content

Commit f0fe112

Browse files
authored
Merge pull request #847 from Unity-Technologies/il2cpp-debbuger-sync
Synchronize changes debugger from the IL2CPP repo
2 parents dcb6577 + 71f1c16 commit f0fe112

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

mono/mini/il2cpp-stubs.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,14 @@ void il2cpp_mono_thread_internal_reset_abort(MonoInternalThread* thread)
763763

764764
gunichar2* il2cpp_mono_thread_get_name(MonoInternalThread* this_obj, guint32* name_len)
765765
{
766-
return NULL;
766+
std::string name = il2cpp::vm::Thread::GetName((Il2CppInternalThread*)this_obj);
767+
768+
if (name_len != NULL)
769+
*name_len = name.size();
770+
771+
if (name.empty())
772+
return NULL;
773+
return g_utf8_to_utf16(name.c_str(), name.size(), NULL, NULL, NULL);
767774
}
768775

769776
void il2cpp_mono_thread_set_name_internal(MonoInternalThread* this_obj, MonoString* name, gboolean permanent, gboolean reset, MonoError* error)

0 commit comments

Comments
 (0)