@@ -8709,11 +8709,6 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint
87098709 goto invalid_object ;
87108710 }
87118711 buffer_add_objid (buf , o );
8712- if (CHECK_ICORDBG (TRUE))
8713- {
8714- MonoType * object_type = m_class_get_byval_arg (m_class_get_element_class (klass ));
8715- buffer_add_value (buf , object_type , o , domain );
8716- }
87178712 break ;
87188713 }
87198714 case CMD_TYPE_GET_SOURCE_FILES :
@@ -8855,10 +8850,36 @@ type_commands_internal (int command, MonoClass *klass, MonoDomain *domain, guint
88558850 }
88568851 case CMD_TYPE_CREATE_INSTANCE : {
88578852 MonoObject * obj ;
8858-
88598853 obj = mono_object_new_checked (klass , error );
88608854 mono_error_assert_ok (error );
88618855 buffer_add_objid (buf , obj );
8856+ if (CHECK_ICORDBG (TRUE))
8857+ {
8858+ buffer_add_byte (buf , m_class_is_valuetype (klass ));
8859+ if (m_class_is_valuetype (klass ))
8860+ {
8861+ int nfields = 0 ;
8862+ gpointer iter = NULL ;
8863+ while ((f = mono_class_get_fields_internal (klass , & iter ))) {
8864+ if (f -> type -> attrs & FIELD_ATTRIBUTE_STATIC )
8865+ continue ;
8866+ if (mono_field_is_deleted (f ))
8867+ continue ;
8868+ nfields ++ ;
8869+ }
8870+ buffer_add_int (buf , nfields );
8871+
8872+ iter = NULL ;
8873+ while ((f = mono_class_get_fields_internal (klass , & iter ))) {
8874+ if (f -> type -> attrs & FIELD_ATTRIBUTE_STATIC )
8875+ continue ;
8876+ if (mono_field_is_deleted (f ))
8877+ continue ;
8878+ buffer_add_int (buf , mono_class_get_field_token (f ));
8879+ buffer_add_byte (buf , f -> type -> type );
8880+ }
8881+ }
8882+ }
88628883 break ;
88638884 }
88648885 case CMD_TYPE_GET_VALUE_SIZE : {
@@ -10113,10 +10134,15 @@ array_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
1011310134
1011410135 switch (command ) {
1011510136 case CMD_ARRAY_REF_GET_TYPE : {
10116- buffer_add_byte (buf , m_class_get_byval_arg (m_class_get_element_class (arr -> obj .vtable -> klass ))-> type );
10137+ MonoTypeEnum type = m_class_get_byval_arg (m_class_get_element_class (arr -> obj .vtable -> klass ))-> type ;
10138+ buffer_add_byte (buf , type );
1011710139 buffer_add_int (buf , m_class_get_rank (arr -> obj .vtable -> klass ));
10118- if (m_class_get_byval_arg (m_class_get_element_class (arr -> obj .vtable -> klass ))-> type == MONO_TYPE_CLASS )
10140+ if (type == MONO_TYPE_CLASS || type == MONO_TYPE_GENERICINST || type == MONO_TYPE_OBJECT )
10141+ {
1011910142 buffer_add_typeid (buf , arr -> obj .vtable -> domain , m_class_get_element_class (arr -> obj .vtable -> klass ));
10143+ if (CHECK_ICORDBG (TRUE))
10144+ buffer_add_byte (buf , MONO_TYPE_ISSTRUCT (m_class_get_byval_arg (m_class_get_element_class (arr -> obj .vtable -> klass ))));
10145+ }
1012010146 }
1012110147 break ;
1012210148 case CMD_ARRAY_REF_GET_LENGTH :
0 commit comments