diff options
author | Aleksey Kliger (λgeek) <alklig@microsoft.com> | 2021-08-13 03:30:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-13 03:30:01 +0300 |
commit | 9f80a67032a1ce9ddfb15732398b38566028af75 (patch) | |
tree | a58d3632b9c7546439764e1d91605393cece465b /mono | |
parent | d8f30c5f9aac8f1cb1e461bcd9c8a278f408c5e8 (diff) |
[mini] Add GC Unsafe transitions in mono_pmip (#21185)
Add a new mono_pmip_u that doesn't do the transition.
The intent is that Mono developers in the debugger can call still call
mono_pmip_u if the thread state machine is in a broken state.
Diffstat (limited to 'mono')
-rw-r--r-- | mono/mini/mini-runtime.c | 20 | ||||
-rw-r--r-- | mono/mini/mini-runtime.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/mono/mini/mini-runtime.c b/mono/mini/mini-runtime.c index 1e9b0f0b9d4..e9c4914a0e2 100644 --- a/mono/mini/mini-runtime.c +++ b/mono/mini/mini-runtime.c @@ -210,10 +210,24 @@ find_tramp (gpointer key, gpointer value, gpointer user_data) ud->method = (MonoMethod*)key; } +static char* +mono_get_method_from_ip_u (void *ip); + /* debug function */ char* mono_get_method_from_ip (void *ip) { + char *result; + MONO_ENTER_GC_UNSAFE; + result = mono_get_method_from_ip_u (ip); + MONO_EXIT_GC_UNSAFE; + return result; +} + +/* debug function */ +static char* +mono_get_method_from_ip_u (void *ip) +{ MonoJitInfo *ji; MonoMethod *method; char *method_name; @@ -282,6 +296,12 @@ mono_pmip (void *ip) return mono_get_method_from_ip (ip); } +G_GNUC_UNUSED char * +mono_pmip_u (void *ip) +{ + return mono_get_method_from_ip_u (ip); +} + /** * mono_print_method_from_ip: * \param ip an instruction pointer address diff --git a/mono/mini/mini-runtime.h b/mono/mini/mini-runtime.h index e44e7bde11a..52adc272c8f 100644 --- a/mono/mini/mini-runtime.h +++ b/mono/mini/mini-runtime.h @@ -517,6 +517,7 @@ const char*mono_ji_type_to_string (MonoJumpInfoType type); void mono_print_ji (const MonoJumpInfo *ji); MONO_API void mono_print_method_from_ip (void *ip); MONO_API char *mono_pmip (void *ip); +MONO_API char *mono_pmip_u (void *ip); MONO_API int mono_ee_api_version (void); gboolean mono_debug_count (void); |