#include <mono/metadata/loader.h>
#include <mono/metadata/assembly.h>
#include <mono/metadata/appdomain.h>
+#include <mono/utils/bsearch.h>
static void setup_filter (MonoImage *image);
static gboolean should_include_type (int idx);
{ METHOD_ATTRIBUTE_RT_SPECIAL_NAME, "rtspecialname " },
{ METHOD_ATTRIBUTE_UNMANAGED_EXPORT, "export " },
/* MS ilasm doesn't compile this statement - is must be added automagically when permissionset are present */
-/* { METHOD_ATTRIBUTE_HAS_SECURITY, "hassecurity" }, */
- { METHOD_ATTRIBUTE_REQUIRE_SEC_OBJECT, "requiresecobj" },
+ { METHOD_ATTRIBUTE_HAS_SECURITY, "" /*"hassecurity"*/ },
+ { METHOD_ATTRIBUTE_REQUIRE_SEC_OBJECT, "requiresecobj " },
{ METHOD_ATTRIBUTE_PINVOKE_IMPL, "pinvokeimpl " },
{ METHOD_ATTRIBUTE_STRICT, "strict " },
{ 0, NULL }
static dis_map_t pinvoke_flags_map [] = {
{ PINVOKE_ATTRIBUTE_NO_MANGLE , "nomangle " },
{ PINVOKE_ATTRIBUTE_SUPPORTS_LAST_ERROR, "lasterr " },
- { PINVOKE_ATTRIBUTE_BEST_FIT_ENABLED, "bestfit:on" },
- { PINVOKE_ATTRIBUTE_BEST_FIT_DISABLED, "bestfit:off" },
- { PINVOKE_ATTRIBUTE_THROW_ON_UNMAPPABLE_ENABLED, "charmaperror:on" },
- { PINVOKE_ATTRIBUTE_THROW_ON_UNMAPPABLE_DISABLED, "charmaperror:off" },
+ { PINVOKE_ATTRIBUTE_BEST_FIT_ENABLED, "bestfit:on " },
+ { PINVOKE_ATTRIBUTE_BEST_FIT_DISABLED, "bestfit:off " },
+ { PINVOKE_ATTRIBUTE_THROW_ON_UNMAPPABLE_ENABLED, "charmaperror:on " },
+ { PINVOKE_ATTRIBUTE_THROW_ON_UNMAPPABLE_DISABLED, "charmaperror:off " },
{ 0, NULL }
};
container = type_container;
ms = mono_metadata_parse_method_signature_full (m, container, i + 1, sig, &sig);
- sig_str = dis_stringify_method_signature (m, ms, i + 1, container, FALSE);
- method_name = mono_metadata_string_heap (m, cols [MONO_METHOD_NAME]);
+ if (ms != NULL){
+ sig_str = dis_stringify_method_signature (m, ms, i + 1, container, FALSE);
+ method_name = mono_metadata_string_heap (m, cols [MONO_METHOD_NAME]);
+ } else {
+ sig_str = NULL;
+ method_name = g_strdup ("<NULL METHOD SIGNATURE>");
+ }
fprintf (output, " // method line %d\n", i + 1);
fprintf (output, " .method %s", flags);
loc.col_idx = MONO_INTERFACEIMPL_CLASS;
loc.idx = typedef_row;
- if (!bsearch (&loc, table->base, table->rows, table->row_size, table_locator))
+ if (!mono_binary_search (&loc, table->base, table->rows, table->row_size, table_locator))
return;
start = loc.result;
{
if (!tf->count)
return FALSE;
- return bsearch (&idx, tf->elems, tf->count, sizeof (int), int_cmp) != NULL;
+ return mono_binary_search (&idx, tf->elems, tf->count, sizeof (int), int_cmp) != NULL;
}
static gboolean