* Copyright 2001-2003 Ximian, Inc (http://www.ximian.com)
* Copyright 2004-2009 Novell, Inc (http://www.novell.com)
* Copyright 2011 Xamarin Inc (http://www.xamarin.com).
+ * Licensed under the MIT license. See LICENSE file in the project root for full license information.
*/
#include "config.h"
void
mono_profiler_coverage_get (MonoProfiler *prof, MonoMethod *method, MonoProfileCoverageFunc func)
{
+ MonoError error;
MonoProfileCoverageInfo* info = NULL;
int i, offset;
guint32 code_size;
if (!info)
return;
- header = mono_method_get_header (method);
+ header = mono_method_get_header_checked (method, &error);
+ mono_error_assert_ok (&error);
start = mono_method_header_get_code (header, &code_size, NULL);
debug_minfo = mono_debug_lookup_method (method);