Skip to content

Commit a4bb83a

Browse files
authored
[mini] Allow MONO_VERBOSE_METHOD='*:*' (#61520)
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.
1 parent 0818df1 commit a4bb83a

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/mono/mono/metadata/debug-helpers.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,13 @@ mono_method_desc_match (MonoMethodDesc *desc, MonoMethod *method)
470470
char *sig;
471471
gboolean name_match;
472472

473+
if (desc->name_glob && !strcmp (desc->name, "*"))
474+
return TRUE;
475+
#if 0
476+
/* FIXME: implement g_pattern_match_simple in eglib */
477+
if (desc->name_glob && g_pattern_match_simple (desc->name, method->name))
478+
return TRUE;
479+
#endif
473480
name_match = strcmp (desc->name, method->name) == 0;
474481
if (!name_match)
475482
return FALSE;

src/mono/mono/mini/mini.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3403,7 +3403,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, JitFlags flags, int parts
34033403
for (i = 0; verbose_method_names [i] != NULL; i++){
34043404
const char *name = verbose_method_names [i];
34053405

3406-
if ((strchr (name, '.') > name) || strchr (name, ':')) {
3406+
if ((strchr (name, '.') > name) || strchr (name, ':') || strchr (name, '*')) {
34073407
MonoMethodDesc *desc;
34083408

34093409
desc = mono_method_desc_new (name, TRUE);

0 commit comments

Comments
 (0)