#include "mono/metadata/mono-endian.h"
#include "mono/metadata/appdomain.h" /* mono_init */
#include "mono/metadata/debug-helpers.h"
+#include "mono/utils/mono-compiler.h"
static FILE *output;
static int include_namespace = 0;
static void
print_subtypes (MonoImage *image, MonoClass *class, int depth) {
int i, token;
- MonoTableInfo *t;
+ const MonoTableInfo *t;
MonoClass *child;
if (depth++ > max_depth)
char *p;
guint32 cols [MONO_INTERFACEIMPL_SIZE];
guint32 token, i, count = 0;
- MonoTableInfo *intf = mono_image_get_table_info (image, MONO_TABLE_INTERFACEIMPL);
+ const MonoTableInfo *intf = mono_image_get_table_info (image, MONO_TABLE_INTERFACEIMPL);
cname = g_strdup (cname);
p = strrchr (cname, '.');
const MonoOpcode *opcode;
MonoMethodHeader *header;
GHashTable *hash;
+ static GHashTable *visited = NULL;
const unsigned char *ip;
int i;
if (depth++ > max_depth)
return;
- if (method->info) /* avoid recursion */
+
+ if (! visited)
+ visited = g_hash_table_new (NULL, NULL);
+
+ if (g_hash_table_lookup (visited, method))
return;
- method->info = method;
+
+ g_hash_table_insert (visited, method, method);
if (method->iflags & (METHOD_IMPL_ATTRIBUTE_INTERNAL_CALL | METHOD_IMPL_ATTRIBUTE_RUNTIME))
return;
aname = argv [i];
if (argc > i + 1)
cname = argv [i + 1];
- if (!aname)
- aname = "mscorlib";
+ if (aname) {
+ assembly = mono_assembly_open (aname, NULL);
+ } else {
+ assembly = mono_image_get_assembly (mono_get_corlib ());
+ }
if (!cname && (graphtype == GRAPH_TYPES))
cname = "System.Object";
- assembly = mono_assembly_open (aname, NULL);
if (!assembly) {
g_print ("cannot open assembly %s\n", aname);
exit (1);