Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonojenkins <jo.shields+jenkins@xamarin.com>2021-11-20 02:27:22 +0300
committerGitHub <noreply@github.com>2021-11-20 02:27:22 +0300
commite100285775e333c2cc66dca29e990b616c352509 (patch)
tree3ae982839ead5d05af55e4130d6f31bcc1bdfb4e
parent0339fe117122821856d94dcaa0b08ab966b7ecb2 (diff)
[mini] Allow MONO_VERBOSE_METHOD='*:*' (#21307)
Implement method name wildcard matching for method descriptions Globbing doesn't work because we don't have g_pattern_match_simple in eglib. But a plain '*' wildcard does work. Also `'className:*'` works. (`*:methodName` already worked) Co-authored-by: lambdageek <lambdageek@users.noreply.github.com>
-rw-r--r--mono/metadata/debug-helpers.c7
-rw-r--r--mono/mini/mini.c2
2 files changed, 8 insertions, 1 deletions
diff --git a/mono/metadata/debug-helpers.c b/mono/metadata/debug-helpers.c
index a86d45fde2d..4c92e6a09a5 100644
--- a/mono/metadata/debug-helpers.c
+++ b/mono/metadata/debug-helpers.c
@@ -470,6 +470,13 @@ mono_method_desc_match (MonoMethodDesc *desc, MonoMethod *method)
char *sig;
gboolean name_match;
+ if (desc->name_glob && !strcmp (desc->name, "*"))
+ return TRUE;
+#if 0
+ /* FIXME: implement g_pattern_match_simple in eglib */
+ if (desc->name_glob && g_pattern_match_simple (desc->name, method->name))
+ return TRUE;
+#endif
name_match = strcmp (desc->name, method->name) == 0;
if (!name_match)
return FALSE;
diff --git a/mono/mini/mini.c b/mono/mini/mini.c
index 495babcd607..173b1ac4508 100644
--- a/mono/mini/mini.c
+++ b/mono/mini/mini.c
@@ -3405,7 +3405,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
for (i = 0; verbose_method_names [i] != NULL; i++){
const char *name = verbose_method_names [i];
- if ((strchr (name, '.') > name) || strchr (name, ':')) {
+ if ((strchr (name, '.') > name) || strchr (name, ':') || strchr (name, '*')) {
MonoMethodDesc *desc;
desc = mono_method_desc_new (name, TRUE);