struct v3_inspector_state * state = V3_Malloc(sizeof(struct v3_inspector_state));
if (!state) {
- PrintError("Cannot allocate state in inspector\n");
+ PrintError(vm, VCORE_NONE, "Cannot allocate state in inspector\n");
return -1;
}
memset(state, 0, sizeof(struct v3_inspector_state));
strncpy(state->state_tree.name, "vm->name", 50);
+ state->state_tree.name[49] = 0;
state->state_tree.subtree = 1;
*priv_data = state;
}
-static int init_inspector_core(struct guest_info * core, void * priv_data) {
+static int init_inspector_core(struct guest_info * core, void * priv_data, void ** core_data) {
struct v3_inspector_state * vm_state = priv_data;
char core_name[50];
static struct v3_extension_impl inspector_impl = {
.name = "inspector",
- .init = init_inspector,
- .deinit = NULL,
+ .init = NULL,
+ .vm_init = init_inspector,
+ .vm_deinit = NULL,
.core_init = init_inspector_core,
.core_deinit = NULL,
.on_entry = NULL,