Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorjaykrell <jay.krell@cornell.edu>2018-01-22 02:41:05 +0300
committerGitHub <noreply@github.com>2018-01-22 02:41:05 +0300
commit3b34235086446239d81347d1ee35644c0f2c3369 (patch)
treecb81585251baf69c6cb631438da5f4568859446d /tools
parent5839d7b43447e3ff6ca080fae0b03b56c67eb5e4 (diff)
Convert dis, profiler, pedump, unit-tests to new MonoError/ERROR_DECL style. (#6607)
Convert dis, profiler, pedump, unit-tests to new MonoError/ERROR_DECL style.
Diffstat (limited to 'tools')
-rw-r--r--tools/pedump/pedump.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/tools/pedump/pedump.c b/tools/pedump/pedump.c
index b75a8fed5be..57691425539 100644
--- a/tools/pedump/pedump.c
+++ b/tools/pedump/pedump.c
@@ -364,12 +364,12 @@ dump_verify_info (MonoImage *image, int flags, gboolean valid_only)
for (i = 0; i < m->rows; ++i) {
MonoMethod *method;
- MonoError error;
+ ERROR_DECL (error);
- method = mono_get_method_checked (image, MONO_TOKEN_METHOD_DEF | (i+1), NULL, NULL, &error);
+ method = mono_get_method_checked (image, MONO_TOKEN_METHOD_DEF | (i+1), NULL, NULL, error);
if (!method) {
- g_print ("Warning: Cannot lookup method with token 0x%08x due to %s\n", i + 1, mono_error_get_message (&error));
- mono_error_cleanup (&error);
+ g_print ("Warning: Cannot lookup method with token 0x%08x due to %s\n", i + 1, mono_error_get_message (error));
+ mono_error_cleanup (error);
continue;
}
errors = mono_method_verify (method, flags);
@@ -515,31 +515,29 @@ verify_image_file (const char *fname)
table = &image->tables [MONO_TABLE_TYPEDEF];
for (i = 1; i <= table->rows; ++i) {
- MonoError error;
+ ERROR_DECL (error);
guint32 token = i | MONO_TOKEN_TYPE_DEF;
- MonoClass *klass = mono_class_get_checked (image, token, &error);
+ MonoClass *klass = mono_class_get_checked (image, token, error);
if (!klass) {
- printf ("Could not load class with token %x due to %s\n", token, mono_error_get_message (&error));
- mono_error_cleanup (&error);
+ printf ("Could not load class with token %x due to %s\n", token, mono_error_get_message (error));
+ mono_error_cleanup (error);
continue;
}
mono_class_init (klass);
if (mono_class_has_failure (klass)) {
- MonoError type_load_error;
- error_init (&type_load_error);
- mono_error_set_for_class_failure (&type_load_error, klass);
- printf ("Could not initialize class(0x%08x) %s.%s due to %s\n", token, klass->name_space, klass->name, mono_error_get_message (&type_load_error));
- mono_error_cleanup (&type_load_error);
+ ERROR_DECL (type_load_error);
+ mono_error_set_for_class_failure (type_load_error, klass);
+ printf ("Could not initialize class(0x%08x) %s.%s due to %s\n", token, klass->name_space, klass->name, mono_error_get_message (type_load_error));
+ mono_error_cleanup (type_load_error);
++count;
}
mono_class_setup_vtable (klass);
if (mono_class_has_failure (klass)) {
- MonoError type_load_error;
- error_init (&type_load_error);
- mono_error_set_for_class_failure (&type_load_error, klass);
- printf ("Could not initialize vtable of class(0x%08x) %s.%s due to %s\n", token, klass->name_space, klass->name, mono_error_get_message (&type_load_error));
- mono_error_cleanup (&type_load_error);
+ ERROR_DECL (type_load_error);
+ mono_error_set_for_class_failure (type_load_error, klass);
+ printf ("Could not initialize vtable of class(0x%08x) %s.%s due to %s\n", token, klass->name_space, klass->name, mono_error_get_message (type_load_error));
+ mono_error_cleanup (type_load_error);
++count;
}
}