#include <mono/metadata/gc-internals.h>
#include <mono/metadata/coree.h>
#include <mono/metadata/attach.h>
+#include <mono/metadata/w32process.h>
#include "mono/utils/mono-counters.h"
#include "mono/utils/mono-hwcap.h"
#include "mono/utils/mono-logger-internals.h"
-#include "mono/utils/w32handle.h"
+#include "mono/metadata/w32handle.h"
#include "mini.h"
#include "jit.h"
(method->flags & METHOD_ATTRIBUTE_ABSTRACT))
continue;
- if (method->klass->generic_container)
+ if (mono_class_is_gtd (method->klass))
continue;
sig = mono_method_signature (method);
if (!sig) {
#ifdef HOST_WIN32
" --mixed-mode Enable mixed-mode image support.\n"
#endif
+ " --handlers Install custom handlers, use --help-handlers for details.\n"
);
}
}
#endif
+
+#define MONO_HANDLERS_ARGUMENT "--handlers="
+#define MONO_HANDLERS_ARGUMENT_LEN G_N_ELEMENTS(MONO_HANDLERS_ARGUMENT)-1
+
/**
* mono_main:
* @argc: number of arguments in the argv array
} else if (strcmp (argv [i], "--nacl-null-checks-off") == 0){
nacl_null_checks_off = TRUE;
#endif
+ } else if (strncmp (argv [i], MONO_HANDLERS_ARGUMENT, MONO_HANDLERS_ARGUMENT_LEN) == 0) {
+ //Install specific custom handlers.
+ if (!mono_runtime_install_custom_handlers (argv[i] + MONO_HANDLERS_ARGUMENT_LEN)) {
+ fprintf (stderr, "error: " MONO_HANDLERS_ARGUMENT ", one or more unknown handlers: '%s'\n", argv [i]);
+ return 1;
+ }
+ } else if (strcmp (argv [i], "--help-handlers") == 0) {
+ mono_runtime_install_custom_handlers_usage ();
+ return 0;
} else if (argv [i][0] == '-' && argv [i][1] == '-' && mini_parse_debug_option (argv [i] + 2)) {
} else {
fprintf (stderr, "Unknown command line option: '%s'\n", argv [i]);
{
char *runtime_path;
- runtime_path = wapi_process_get_path (getpid ());
+ runtime_path = mono_w32process_get_path (getpid ());
if (runtime_path) {
- wapi_process_set_cli_launcher (runtime_path);
+ mono_w32process_set_cli_launcher (runtime_path);
g_free (runtime_path);
}
}