Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/mono/mono/component/debugger-agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -9324,7 +9324,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g
names = g_new (char *, sig->param_count);
mono_method_get_param_names_internal (method, (const char **) names);
for (guint16 i = 0; i < sig->param_count; ++i)
buffer_add_string (buf, names [i]);
buffer_add_string (buf, names [i] ? names [i] : "");
g_free (names);

break;
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/metadata/loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,7 @@ mono_method_get_param_names_internal (MonoMethod *method, const char **names)
return;

for (i = 0; i < signature->param_count; ++i)
names [i] = "";
names [i] = NULL;

klass = method->klass;
if (m_class_get_rank (klass))
Expand Down
9 changes: 7 additions & 2 deletions src/mono/mono/metadata/reflection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1017,8 +1017,13 @@ add_parameter_object_to_array (MonoMethod *method, MonoObjectHandle member, int
goto_if_nok (error, leave);

MonoStringHandle name_str;
name_str = mono_string_new_handle (name, error);
goto_if_nok (error, leave);
if (name != NULL) {
name_str = mono_string_new_handle (name, error);
goto_if_nok (error, leave);
} else {
// Keep NULL as NULL instead of converting to empty string
name_str = MONO_HANDLE_NEW (MonoString, NULL);
}

MonoObjectHandle def_value;

Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/dwarfwriter.c
Original file line number Diff line number Diff line change
Expand Up @@ -1865,7 +1865,7 @@ mono_dwarf_writer_emit_method (MonoDwarfWriter *w, MonoCompile *cfg, MonoMethod

emit_uleb128 (w, need_loclist ? ABBREV_PARAM_LOCLIST : ABBREV_PARAM);
/* name */
if (pname[0] == '\0') {
if (!pname || pname[0] == '\0') {
sprintf (pname_buf, "param%d", i - sig->hasthis);
pname = pname_buf;
}
Expand Down