encode_value (jit->has_var_info, p, &p);
if (jit->has_var_info) {
+ encode_value (jit->num_locals, p, &p);
+
for (i = 0; i < jit->num_params; ++i)
serialize_variable (&jit->params [i], p, &p);
static MonoDebugMethodJitInfo *
deserialize_debug_info (MonoMethod *method, guint8 *code_start, guint8 *buf, guint32 buf_len)
{
- ERROR_DECL (error);
- MonoMethodHeader *header;
gint32 offset, native_offset, prev_offset, prev_native_offset;
MonoDebugMethodJitInfo *jit;
guint8 *p;
int i;
- header = mono_method_get_header_checked (method, error);
- mono_error_assert_ok (error); /* FIXME don't swallow the error */
-
jit = g_new0 (MonoDebugMethodJitInfo, 1);
jit->code_start = code_start;
jit->has_var_info = decode_value (p, &p);
if (jit->has_var_info) {
- jit->num_locals = header->num_locals;
+ jit->num_locals = decode_value (p, &p);
+
jit->num_params = mono_method_signature_internal (method)->param_count;
jit->params = g_new0 (MonoDebugVarInfo, jit->num_params);
jit->locals = g_new0 (MonoDebugVarInfo, jit->num_locals);
prev_native_offset = native_offset;
}
- mono_metadata_free_mh (header);
return jit;
}