cols [MONO_ASSEMBLYREF_MAJOR_VERSION], cols [MONO_ASSEMBLYREF_MINOR_VERSION],
cols [MONO_ASSEMBLYREF_BUILD_NUMBER], cols [MONO_ASSEMBLYREF_REV_NUMBER]
);
+ dump_cattrs (m, MONO_TOKEN_ASSEMBLY_REF | (i + 1), " ");
if (cols [MONO_ASSEMBLYREF_CULTURE]){
fprintf (output, " .locale %s\n", mono_metadata_string_heap (m, cols [MONO_ASSEMBLYREF_CULTURE]));
}
for (i = 0; i < t->rows; i++){
guint32 cols [MONO_MODULEREF_SIZE];
- char *esc;
mono_metadata_decode_row (t, i, cols, MONO_MODULEREF_SIZE);
- esc = get_escaped_name (mono_metadata_string_heap (m, cols [MONO_MODULEREF_NAME]));
- fprintf (output, ".module extern %s\n", esc);
- g_free (esc);
+ fprintf (output, ".module extern '%s'\n", mono_metadata_string_heap (m, cols [MONO_MODULEREF_NAME]));
}
}
+static void
+dis_nt_header (MonoImage *m)
+{
+ MonoCLIImageInfo *image_info = m->image_info;
+ if (image_info && image_info->cli_header.nt.pe_stack_reserve != 0x100000)
+ fprintf (output, ".stackreserve 0x%x\n", image_info->cli_header.nt.pe_stack_reserve);
+}
+
static void
dis_directive_file (MonoImage *m)
{
{ "--methodspec", MONO_TABLE_METHODSPEC, dump_table_methodspec },
{ "--moduleref", MONO_TABLE_MODULEREF, dump_table_moduleref },
{ "--module", MONO_TABLE_MODULE, dump_table_module },
+ { "--mresources", 0, dis_mresource },
{ "--nested", MONO_TABLE_NESTEDCLASS, dump_table_nestedclass },
{ "--param", MONO_TABLE_PARAM, dump_table_param },
{ "--parconst", MONO_TABLE_GENERICPARAMCONSTRAINT, dump_table_parconstraint },
dis_directive_mresource (img);
dis_directive_module (img);
dis_directive_moduleref (img);
+ dis_nt_header (img);
if (dump_managed_resources)
dis_mresource (img);
if (dump_forward_decls) {
if (((i-2) % 5) == 0)
g_string_append_c (args, '\n');
}
- g_string_append (args, "[--forward-decls]\n[--mresources]");
+ g_string_append (args, "[--forward-decls]");
fprintf (stderr,
"monodis -- Mono Common Intermediate Language Dissassembler\n"
"Usage is: monodis %s file ..\n", args->str);
argv [i]+9, strerror (errno));
exit (1);
}
+ dump_managed_resources = TRUE;
continue;
} else if (strncmp (argv [i], "--filter=", 9) == 0) {
load_filter (argv [i]+9);
} else if (strcmp (argv [i], "--forward-decls") == 0) {
dump_forward_decls = TRUE;
continue;
- } else if (strcmp (argv [i], "--mresources") == 0) {
- dump_managed_resources = TRUE;
- continue;
} else if (strcmp (argv [i], "--help") == 0)
usage ();
for (j = 0; table_list [j].name != NULL; j++) {