19 int main(int argc, char* argv[]) {
22 struct v3_debug_cmd cmd;
25 printf("usage: v3_debug <vm_device> <vm core> <cmd>\n");
26 printf("This will cause debugging output to be sent to the log\n\n");
28 printf(" 1 telemetry\n");
29 printf(" 2 core state\n");
30 printf(" 3 arch state\n");
32 printf(" 5 backtrace\n");
33 printf(" 100 everything\n");
34 printf(" 101 telemetry+core state+arch state\n");
39 cmd.core = atoi(argv[2]);
40 cmd.cmd = atoi(argv[3]);
42 printf("Debug Virtual Core %d with Command %d\n", cmd.core, cmd.cmd);
44 vm_fd = open(vm_dev, O_RDONLY);
47 printf("Error opening VM device: %s\n", vm_dev);
51 int err = ioctl(vm_fd, V3_VM_DEBUG, &cmd);
54 printf("Error write core migrating command to vm\n");