This code should now build the x86_x64-softmmu part 2.
This commit is contained in:
@@ -15,9 +15,10 @@
|
||||
#include <assert.h>
|
||||
|
||||
static const TypeInfo container_info = {
|
||||
.name = "container",
|
||||
.instance_size = sizeof(Object),
|
||||
.parent = TYPE_OBJECT,
|
||||
"container",
|
||||
TYPE_OBJECT,
|
||||
0,
|
||||
sizeof(Object),
|
||||
};
|
||||
|
||||
void container_register_types(struct uc_struct *uc)
|
||||
|
||||
@@ -89,7 +89,7 @@ void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
|
||||
{
|
||||
CPUClass *cc = CPU_GET_CLASS(cpu->uc, cpu);
|
||||
|
||||
return cc->get_memory_mapping(cpu, list, errp);
|
||||
cc->get_memory_mapping(cpu, list, errp);
|
||||
}
|
||||
|
||||
static void cpu_common_get_memory_mapping(CPUState *cpu,
|
||||
@@ -258,13 +258,24 @@ static void cpu_class_init(struct uc_struct *uc, ObjectClass *klass, void *data)
|
||||
}
|
||||
|
||||
static const TypeInfo cpu_type_info = {
|
||||
.name = TYPE_CPU,
|
||||
.parent = TYPE_DEVICE,
|
||||
.instance_size = sizeof(CPUState),
|
||||
.instance_init = cpu_common_initfn,
|
||||
.abstract = true,
|
||||
.class_size = sizeof(CPUClass),
|
||||
.class_init = cpu_class_init,
|
||||
TYPE_CPU,
|
||||
TYPE_DEVICE,
|
||||
|
||||
sizeof(CPUClass),
|
||||
sizeof(CPUState),
|
||||
NULL,
|
||||
|
||||
cpu_common_initfn,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
|
||||
cpu_class_init,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
true,
|
||||
};
|
||||
|
||||
void cpu_register_types(struct uc_struct *uc)
|
||||
|
||||
@@ -217,7 +217,7 @@ static void type_initialize_interface(struct uc_struct *uc, TypeImpl *ti, TypeIm
|
||||
TypeImpl *parent_type)
|
||||
{
|
||||
InterfaceClass *new_iface;
|
||||
TypeInfo info = { };
|
||||
TypeInfo info = { 0 };
|
||||
TypeImpl *iface_impl;
|
||||
|
||||
info.parent = parent_type->name;
|
||||
@@ -252,9 +252,9 @@ static void type_initialize(struct uc_struct *uc, TypeImpl *ti)
|
||||
|
||||
parent = type_get_parent(uc, ti);
|
||||
if (parent) {
|
||||
type_initialize(uc, parent);
|
||||
GSList *e;
|
||||
int i;
|
||||
type_initialize(uc, parent);
|
||||
|
||||
g_assert(parent->class_size <= ti->class_size);
|
||||
memcpy(ti->class, parent->class, parent->class_size);
|
||||
@@ -1645,16 +1645,45 @@ static void object_instance_init(struct uc_struct *uc, Object *obj, void *opaque
|
||||
void register_types_object(struct uc_struct *uc)
|
||||
{
|
||||
static TypeInfo interface_info = {
|
||||
.name = TYPE_INTERFACE,
|
||||
.class_size = sizeof(InterfaceClass),
|
||||
.abstract = true,
|
||||
TYPE_INTERFACE, // name
|
||||
NULL,
|
||||
|
||||
sizeof(InterfaceClass), // class_size
|
||||
0,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
true, // abstract
|
||||
};
|
||||
|
||||
static TypeInfo object_info = {
|
||||
.name = TYPE_OBJECT,
|
||||
.instance_size = sizeof(Object),
|
||||
.instance_init = object_instance_init,
|
||||
.abstract = true,
|
||||
TYPE_OBJECT,
|
||||
NULL,
|
||||
|
||||
0,
|
||||
sizeof(Object),
|
||||
NULL,
|
||||
|
||||
object_instance_init,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
||||
true,
|
||||
};
|
||||
|
||||
uc->type_interface = type_register_internal(uc, &interface_info);
|
||||
|
||||
Reference in New Issue
Block a user