From e100285775e333c2cc66dca29e990b616c352509 Mon Sep 17 00:00:00 2001 From: monojenkins Date: Fri, 19 Nov 2021 18:27:22 -0500 Subject: [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 --- mono/metadata/debug-helpers.c | 7 +++++++ mono/mini/mini.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3