From f59b99f22c7bf9348cd43306469b89093f36c666 Mon Sep 17 00:00:00 2001 From: Rodrigo Kumpera Date: Fri, 8 Sep 2017 11:58:19 -0700 Subject: [PATCH] [mini] Add MONO_ prefix to RETURN_ADDRESS macro. --- mono/mini/mini-exceptions.c | 2 +- mono/mini/mini.h | 12 ++++++------ mono/mini/trace.c | 8 ++++---- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mono/mini/mini-exceptions.c b/mono/mini/mini-exceptions.c index 10cf1b75cb1..0a2691f6638 100644 --- a/mono/mini/mini-exceptions.c +++ b/mono/mini/mini-exceptions.c @@ -3263,7 +3263,7 @@ mono_llvm_load_exception (void) if (mono_ex->trace_ips) { GList *trace_ips = NULL; - gpointer ip = RETURN_ADDRESS (); + gpointer ip = MONO_RETURN_ADDRESS (); size_t upper = mono_array_length (mono_ex->trace_ips); diff --git a/mono/mini/mini.h b/mono/mini/mini.h index ec102c86c28..fe5071f8d8a 100644 --- a/mono/mini/mini.h +++ b/mono/mini/mini.h @@ -3273,22 +3273,22 @@ void mono_interruption_checkpoint_from_trampoline (void); #if defined (HOST_WASM) -#define RETURN_ADDRESS_N(N) NULL -#define RETURN_ADDRESS() RETURN_ADDRESS_N(0) +#define MONO_RETURN_ADDRESS_N(N) NULL +#define MONO_RETURN_ADDRESS() MONO_RETURN_ADDRESS_N(0) #elif defined (__GNUC__) -#define RETURN_ADDRESS_N(N) (__builtin_extract_return_addr (__builtin_return_address (N))) -#define RETURN_ADDRESS() RETURN_ADDRESS_N(0) +#define MONO_RETURN_ADDRESS_N(N) (__builtin_extract_return_addr (__builtin_return_address (N))) +#define MONO_RETURN_ADDRESS() MONO_RETURN_ADDRESS_N(0) #elif defined(_MSC_VER) #include #pragma intrinsic(_ReturnAddress) -#define RETURN_ADDRESS() _ReturnAddress() -#define RETURN_ADDRESS_N(N) NULL +#define MONO_RETURN_ADDRESS() _ReturnAddress() +#define MONO_RETURN_ADDRESS_N(N) NULL #else diff --git a/mono/mini/trace.c b/mono/mini/trace.c index b81fe604ed3..3c916a941b3 100644 --- a/mono/mini/trace.c +++ b/mono/mini/trace.c @@ -416,7 +416,7 @@ mono_trace_enter_method (MonoMethod *method, char *ebp) g_free (fname); if (!ebp) { - printf (") ip: %p\n", RETURN_ADDRESS_N (1)); + printf (") ip: %p\n", MONO_RETURN_ADDRESS_N (1)); goto unlock; } @@ -426,7 +426,7 @@ mono_trace_enter_method (MonoMethod *method, char *ebp) if (method->is_inflated) { /* FIXME: Might be better to pass the ji itself */ - MonoJitInfo *ji = mini_jit_info_table_find (mono_domain_get (), (char *)RETURN_ADDRESS (), NULL); + MonoJitInfo *ji = mini_jit_info_table_find (mono_domain_get (), (char *)MONO_RETURN_ADDRESS (), NULL); if (ji) { gsctx = mono_jit_info_get_generic_sharing_context (ji); if (gsctx && gsctx->is_gsharedvt) { @@ -590,7 +590,7 @@ mono_trace_leave_method (MonoMethod *method, ...) if (method->is_inflated) { /* FIXME: Might be better to pass the ji itself */ - MonoJitInfo *ji = mini_jit_info_table_find (mono_domain_get (), (char *)RETURN_ADDRESS (), NULL); + MonoJitInfo *ji = mini_jit_info_table_find (mono_domain_get (), (char *)MONO_RETURN_ADDRESS (), NULL); if (ji) { gsctx = mono_jit_info_get_generic_sharing_context (ji); if (gsctx && gsctx->is_gsharedvt) { @@ -698,7 +698,7 @@ mono_trace_leave_method (MonoMethod *method, ...) printf ("(unknown return type %x)", mono_method_signature (method)->ret->type); } - //printf (" ip: %p\n", RETURN_ADDRESS_N (1)); + //printf (" ip: %p\n", MONO_RETURN_ADDRESS_N (1)); printf ("\n"); fflush (stdout); -- 2.11.4.GIT