Skip to content

Commit

Permalink
use the module name, not image->name
Browse files Browse the repository at this point in the history
module name comes from the metadata Module table and is something like
"Foo.dll" even if the assembly is loaded from a bundle or from
Assembly.Load(byte[]), whereas image->name might be "data-0x00abcdef"
for byte loads
  • Loading branch information
lambdageek committed Jul 29, 2022
1 parent 4152c28 commit 2009c30
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/mono/mono/eventpipe/ep-rt-mono.c
Original file line number Diff line number Diff line change
Expand Up @@ -3784,7 +3784,17 @@ get_module_event_data (
if (image && image->aot_module)
module_data->module_flags |= MODULE_FLAGS_NATIVE_MODULE;

module_data->module_il_path = image && image->filename ? image->filename : (image && image->name ? image->name : "");
module_data->module_il_path = NULL;
if (image && image->filename) {
/* if there's a filename, use it */
module_data->module_il_path = image->filename;
} else if (image && image->module_name) {
/* otherwise, use the module name */
module_data->module_il_path = image->module_name;
}
if (!module_data->module_il_path)
module_data->module_il_path = "";

module_data->module_il_pdb_path = "";
module_data->module_il_pdb_age = 0;

Expand Down

0 comments on commit 2009c30

Please sign in to comment.