--- trunk/src/emul.c 2007/10/08 16:18:27 10 +++ trunk/src/emul.c 2007/10/08 16:20:26 28 @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003-2005 Anders Gavare. All rights reserved. + * Copyright (C) 2003-2006 Anders Gavare. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * - * $Id: emul.c,v 1.211 2005/06/26 11:36:28 debug Exp $ + * $Id: emul.c,v 1.258 2006/07/20 21:52:59 debug Exp $ * * Emulation startup and misc. routines. */ @@ -39,7 +39,6 @@ #include #include "arcbios.h" -#include "bintrans.h" #include "cpu.h" #include "emul.h" #include "console.h" @@ -56,13 +55,17 @@ #include "x11.h" -extern int force_debugger_at_exit; - extern int extra_argc; extern char **extra_argv; extern int verbose; extern int quiet_mode; +extern int force_debugger_at_exit; +extern int single_step; +extern int old_show_trace_tree; +extern int old_instruction_trace; +extern int old_quiet_mode; +extern int quiet_mode; extern struct emul *debugger_emul; extern struct diskimage *diskimages[]; @@ -70,6 +73,15 @@ static char *diskimage_types[] = DISKIMAGE_TYPES; +static void print_separator(void) +{ + int i = 79; + while (i-- > 0) + debug("-"); + debug("\n"); +} + + /* * add_dump_points(): * @@ -96,12 +108,12 @@ uint64_t addr; int res = get_symbol_addr(&m->symbol_context, m->breakpoint_string[i], &addr); - if (!res) + if (!res) { fprintf(stderr, - "WARNING! Breakpoint '%s' could not be" + "ERROR! Breakpoint '%s' could not be" " parsed\n", m->breakpoint_string[i]); - else { + } else { dp = addr; string_flag = 1; } @@ -112,11 +124,14 @@ * were automatically converted into the correct address. */ - if ((dp >> 32) == 0 && ((dp >> 31) & 1)) - dp |= 0xffffffff00000000ULL; + if (m->arch == ARCH_MIPS) { + if ((dp >> 32) == 0 && ((dp >> 31) & 1)) + dp |= 0xffffffff00000000ULL; + } + m->breakpoint_addr[i] = dp; - debug("breakpoint %i: 0x%016llx", i, (long long)dp); + debug("breakpoint %i: 0x%llx", i, (long long)dp); if (string_flag) debug(" (%s)", m->breakpoint_string[i]); debug("\n"); @@ -149,7 +164,7 @@ int *n_loadp, char ***load_namesp) { char str[35]; - int filenr, i, ofs, dirlen, res = 0, res2, iadd = 4; + int filenr, i, ofs, dirlen, res = 0, res2, iadd = DEBUG_INDENTATION; int found_dir; uint64_t dirofs; uint64_t fileofs, filelen; @@ -158,7 +173,7 @@ char *p, *filename_orig; char *filename = strdup(cpu->machine->boot_kernel_filename); unsigned char *filebuf = NULL; - char *tmpfilename = NULL; + char *tmpfname = NULL; char **new_array; int tmpfile_handle; @@ -204,7 +219,7 @@ fatal("WARNING: Root directory length mismatch?\n"); dirofs = (int64_t)(buf[0x8c] + (buf[0x8d] << 8) + (buf[0x8e] << 16) + - (buf[0x8f] << 24)) * 2048; + ((uint64_t)buf[0x8f] << 24)) * 2048; /* debug("root = %i bytes at 0x%llx\n", dirlen, (long long)dirofs); */ @@ -225,8 +240,9 @@ dp = dirbuf; filenr = 1; p = NULL; while (dp < dirbuf + dirlen) { - int i, nlen = dp[0]; - int x = dp[2] + (dp[3] << 8) + (dp[4] << 16) + (dp[5] << 24); + size_t i, nlen = dp[0]; + int x = dp[2] + (dp[3] << 8) + (dp[4] << 16) + + ((uint64_t)dp[5] << 24); int y = dp[6] + (dp[7] << 8); char direntry[65]; @@ -296,7 +312,7 @@ } for (;;) { - int len, i; + size_t len, i; /* Too close to another sector? Then realign. */ if ((dirofs & 2047) + 70 > 2047) { @@ -361,9 +377,9 @@ } fileofs = match_entry[2] + (match_entry[3] << 8) + - (match_entry[4] << 16) + (match_entry[5] << 24); + (match_entry[4] << 16) + ((uint64_t)match_entry[5] << 24); filelen = match_entry[10] + (match_entry[11] << 8) + - (match_entry[12] << 16) + (match_entry[13] << 24); + (match_entry[12] << 16) + ((uint64_t)match_entry[13] << 24); fileofs *= 2048; /* debug("filelen=%llx fileofs=%llx\n", (long long)filelen, @@ -376,10 +392,7 @@ goto ret; } - tmpfilename = strdup("/tmp/gxemul.XXXXXXXXXXXX"); - - debug("extracting %lli bytes into %s\n", - (long long)filelen, tmpfilename); + tmpfname = strdup("/tmp/gxemul.XXXXXXXXXXXX"); res2 = diskimage_access(m, disk_id, disk_type, 0, fileofs, filebuf, filelen); @@ -388,14 +401,16 @@ goto ret; } - tmpfile_handle = mkstemp(tmpfilename); + tmpfile_handle = mkstemp(tmpfname); if (tmpfile_handle < 0) { - fatal("could not create %s\n", tmpfilename); + fatal("could not create %s\n", tmpfname); exit(1); } write(tmpfile_handle, filebuf, filelen); close(tmpfile_handle); + debug("extracted %lli bytes into %s\n", (long long)filelen, tmpfname); + /* Add the temporary filename to the load_namesp array: */ (*n_loadp)++; new_array = malloc(sizeof(char *) * (*n_loadp)); @@ -409,11 +424,11 @@ /* This adds a Backspace char in front of the filename; this is a special hack which causes the file to be removed once it has been loaded. */ - tmpfilename = realloc(tmpfilename, strlen(tmpfilename) + 2); - memmove(tmpfilename + 1, tmpfilename, strlen(tmpfilename) + 1); - tmpfilename[0] = 8; + tmpfname = realloc(tmpfname, strlen(tmpfname) + 2); + memmove(tmpfname + 1, tmpfname, strlen(tmpfname) + 1); + tmpfname[0] = 8; - (*load_namesp)[*n_loadp - 1] = tmpfilename; + (*load_namesp)[*n_loadp - 1] = tmpfname; res = 1; @@ -435,6 +450,70 @@ /* + * apple_load_bootblock(): + * + * Try to load a kernel from a disk image with an Apple Partition Table. + * + * TODO: This function uses too many magic offsets and so on; it should be + * cleaned up some day. See http://www.awprofessional.com/articles/ + * article.asp?p=376123&seqNum=3&rl=1 for some info on the Apple + * partition format. + * + * Returns 1 on success, 0 on failure. + */ +static int apple_load_bootblock(struct machine *m, struct cpu *cpu, + int disk_id, int disk_type, int *n_loadp, char ***load_namesp) +{ + unsigned char buf[0x8000]; + int res, partnr, n_partitions = 0, n_hfs_partitions = 0; + uint64_t hfs_start, hfs_length; + + res = diskimage_access(m, disk_id, disk_type, 0, 0x0, buf, sizeof(buf)); + if (!res) { + fatal("apple_load_bootblock: couldn't read the disk " + "image. Aborting.\n"); + return 0; + } + + partnr = 0; + do { + int start, length; + int ofs = 0x200 * (partnr + 1); + if (partnr == 0) + n_partitions = buf[ofs + 7]; + start = ((uint64_t)buf[ofs + 8] << 24) + (buf[ofs + 9] << 16) + + (buf[ofs + 10] << 8) + buf[ofs + 11]; + length = ((uint64_t)buf[ofs+12] << 24) + (buf[ofs + 13] << 16) + + (buf[ofs + 14] << 8) + buf[ofs + 15]; + + debug("partition %i: '%s', type '%s', start %i, length %i\n", + partnr, buf + ofs + 0x10, buf + ofs + 0x30, + start, length); + + if (strcmp((char *)buf + ofs + 0x30, "Apple_HFS") == 0) { + n_hfs_partitions ++; + hfs_start = 512 * start; + hfs_length = 512 * length; + } + + /* Any more partitions? */ + partnr ++; + } while (partnr < n_partitions); + + if (n_hfs_partitions == 0) { + fatal("Error: No HFS partition found! TODO\n"); + return 0; + } + if (n_hfs_partitions >= 2) { + fatal("Error: Too many HFS partitions found! TODO\n"); + return 0; + } + + return 0; +} + + +/* * load_bootblock(): * * For some emulation modes, it is possible to boot from a harddisk image by @@ -459,7 +538,7 @@ return 0; switch (m->machine_type) { - case MACHINE_DEC: + case MACHINE_PMAX: /* * The first few bytes of a disk contains information about * where the bootblock(s) are located. (These are all 32-bit @@ -480,7 +559,7 @@ minibuf, sizeof(minibuf)); bootblock_loadaddr = minibuf[0x10] + (minibuf[0x11] << 8) - + (minibuf[0x12] << 16) + (minibuf[0x13] << 24); + + (minibuf[0x12] << 16) + ((uint64_t)minibuf[0x13] << 24); /* Convert loadaddr to uncached: */ if ((bootblock_loadaddr & 0xf0000000ULL) != 0x80000000 && @@ -491,7 +570,7 @@ bootblock_loadaddr |= 0xffffffffa0000000ULL; bootblock_pc = minibuf[0x14] + (minibuf[0x15] << 8) - + (minibuf[0x16] << 16) + (minibuf[0x17] << 24); + + (minibuf[0x16] << 16) + ((uint64_t)minibuf[0x17] << 24); bootblock_pc &= 0x0fffffffULL; bootblock_pc |= 0xffffffffa0000000ULL; @@ -512,10 +591,10 @@ } n_blocks = minibuf[0] + (minibuf[1] << 8) - + (minibuf[2] << 16) + (minibuf[3] << 24); + + (minibuf[2] << 16) + ((uint64_t)minibuf[3] << 24); - bootblock_offset = (minibuf[4] + (minibuf[5] << 8) - + (minibuf[6] << 16) + (minibuf[7] << 24)) * 512; + bootblock_offset = (minibuf[4] + (minibuf[5] << 8) + + (minibuf[6]<<16) + ((uint64_t)minibuf[7]<<24)) * 512; if (n_blocks < 1) break; @@ -586,7 +665,7 @@ /* * Try reading a kernel manually from the disk. The code here - * does not rely on machine-dependant boot blocks etc. + * does not rely on machine-dependent boot blocks etc. */ /* ISO9660: (0x800 bytes at 0x8000) */ bootblock_buf = malloc(0x800); @@ -623,6 +702,30 @@ n_loadp, load_namesp); } + if (retval != 0) + goto ret_ok; + + /* Apple parition table: */ + res = diskimage_access(m, boot_disk_id, boot_disk_type, + 0, 0x0, bootblock_buf, 0x800); + if (!res) { + fatal("Couldn't read the disk image. Aborting.\n"); + return 0; + } + if (bootblock_buf[0x000] == 'E' && bootblock_buf[0x001] == 'R' && + bootblock_buf[0x200] == 'P' && bootblock_buf[0x201] == 'M') { + /* We can't load a kernel if the name + isn't specified. */ + if (cpu->machine->boot_kernel_filename == NULL || + cpu->machine->boot_kernel_filename[0] == '\0') + fatal("\nApple partition table, but no kernel " + "specified? (Use the -j option.)\n"); + else + retval = apple_load_bootblock(m, cpu, boot_disk_id, + boot_disk_type, n_loadp, load_namesp); + } + +ret_ok: free(bootblock_buf); return retval; } @@ -709,11 +812,17 @@ len += 1048576 * m->memory_offset_in_mb; - /* NOTE/TODO: magic 12MB end of load program area */ + /* + * NOTE/TODO: magic 12MB end of load program area + * + * Hm. This breaks the old FreeBSD/MIPS snapshots... + */ +#if 0 arcbios_add_memory_descriptor(cpu, 0x60000 + m->memory_offset_in_mb * 1048576, start-0x60000 - m->memory_offset_in_mb * 1048576, ARCBIOS_MEM_FreeMemory); +#endif arcbios_add_memory_descriptor(cpu, start, len, ARCBIOS_MEM_LoadedProgram); @@ -806,14 +915,11 @@ void emul_machine_setup(struct machine *m, int n_load, char **load_names, int n_devices, char **device_names) { - struct emul *emul; struct cpu *cpu; - int i, iadd=4; + int i, iadd = DEBUG_INDENTATION; uint64_t memory_amount, entrypoint = 0, gp = 0, toc = 0; int byte_order; - emul = m->emul; - debug("machine \"%s\":\n", m->name); debug_indentation(iadd); @@ -834,8 +940,8 @@ m->cpu_family = cpu_family_ptr_by_number(m->arch); - if (m->arch != ARCH_MIPS) - m->bintrans_enable = 0; + if (m->arch == ARCH_ALPHA) + m->arch_pagesize = 8192; machine_memsize_fix(m); @@ -857,7 +963,7 @@ debug(" (offset by %iMB)", m->memory_offset_in_mb); memory_amount += 1048576 * m->memory_offset_in_mb; } - m->memory = memory_new(memory_amount); + m->memory = memory_new(memory_amount, m->arch); if (m->machine_type != MACHINE_USERLAND) debug("\n"); @@ -884,18 +990,17 @@ } memset(m->cpus, 0, sizeof(struct cpu *) * m->ncpus); - /* Initialize dynamic binary translation, if available: */ - if (m->bintrans_enable) - bintrans_init(m, m->memory); - debug("cpu0"); if (m->ncpus > 1) debug(" .. cpu%i", m->ncpus - 1); debug(": "); for (i=0; incpus; i++) { m->cpus[i] = cpu_new(m->memory, m, i, m->cpu_name); - if (m->bintrans_enable) - bintrans_init_cpu(m->cpus[i]); + if (m->cpus[i] == NULL) { + fprintf(stderr, "Unable to create CPU object. " + "Aborting."); + exit(1); + } } debug("\n"); @@ -906,8 +1011,6 @@ m->cpus[m->ncpus] = cpu_new(m->memory, m, 0 /* use 0 here to show info with debug() */, "Allegrex" /* TODO */); - if (m->bintrans_enable) - bintrans_init_cpu(m->cpus[m->ncpus]); debug("\n"); m->ncpus ++; } @@ -924,7 +1027,15 @@ if (m->userland_emul != NULL) { useremul_name_to_useremul(cpu, m->userland_emul, NULL, NULL, NULL); - cpu->memory_rw = userland_memory_rw; + + switch (m->arch) { +#ifdef ENABLE_ALPHA + case ARCH_ALPHA: + cpu->memory_rw = alpha_userland_memory_rw; + break; +#endif + default:cpu->memory_rw = userland_memory_rw; + } } if (m->use_x11) @@ -955,6 +1066,7 @@ } diskimage_dump_info(m); + console_debug_dump(m); /* Load files (ROM code, boot code, ...) into memory: */ if (n_load == 0) { @@ -1103,9 +1215,42 @@ cpu->pc = entrypoint; switch (m->arch) { + + case ARCH_ALPHA: + /* For position-independent code: */ + cpu->cd.alpha.r[ALPHA_T12] = cpu->pc; + break; + + case ARCH_ARM: + if (cpu->pc & 3) { + fatal("ARM: lowest bits of pc set: TODO\n"); + exit(1); + } + cpu->pc &= 0xfffffffc; + break; + + case ARCH_AVR: + cpu->pc &= 0xfffff; + if (cpu->pc & 1) { + fatal("AVR: lowest bit of pc set: TODO\n"); + exit(1); + } + break; + + case ARCH_HPPA: + break; + + case ARCH_I960: + break; + + case ARCH_IA64: + break; + + case ARCH_M68K: + break; + case ARCH_MIPS: - if ((cpu->pc >> 32) == 0 - && (cpu->pc & 0x80000000ULL)) + if ((cpu->pc >> 32) == 0 && (cpu->pc & 0x80000000ULL)) cpu->pc |= 0xffffffff00000000ULL; cpu->cd.mips.gpr[MIPS_GPR_GP] = gp; @@ -1121,17 +1266,21 @@ spec/x458.html for more info. */ cpu->cd.ppc.gpr[2] = toc; /* TODO */ + if (cpu->cd.ppc.bits == 32) + cpu->pc &= 0xffffffffULL; + break; + + case ARCH_SH: + if (cpu->cd.sh.bits == 32) + cpu->pc &= 0xffffffffULL; + cpu->pc &= ~1; break; - case ARCH_ALPHA: - case ARCH_HPPA: case ARCH_SPARC: - case ARCH_URISC: break; - case ARCH_ARM: - cpu->pc &= 0xfffffffc; - cpu->cd.arm.r[ARM_PC] = cpu->pc; + case ARCH_TRANSPUTER: + cpu->pc &= 0xffffffffULL; break; case ARCH_X86: @@ -1200,17 +1349,13 @@ add_dump_points(m); /* TODO: This is MIPS-specific! */ - if (m->machine_type == MACHINE_DEC && + if (m->machine_type == MACHINE_PMAX && cpu->cd.mips.cpu_type.mmu_model == MMU3K) add_symbol_name(&m->symbol_context, - 0x9fff0000, 0x10000, "r2k3k_cache", 0); + 0x9fff0000, 0x10000, "r2k3k_cache", 0, 0); symbol_recalc_sizes(&m->symbol_context); - if (m->max_random_cycles_per_chunk > 0) - debug("using random cycle chunks (1 to %i cycles)\n", - m->max_random_cycles_per_chunk); - /* Special hack for ARC/SGI emulation: */ if ((m->machine_type == MACHINE_ARC || m->machine_type == MACHINE_SGI) && m->prom_emulation) @@ -1218,9 +1363,19 @@ debug("starting cpu%i at ", m->bootstrap_cpu); switch (m->arch) { + + case ARCH_ARM: + /* ARM cpus aren't 64-bit: */ + debug("0x%08x", (int)entrypoint); + break; + + case ARCH_AVR: + /* Atmel AVR uses a 16-bit or 22-bit program counter: */ + debug("0x%04x", (int)entrypoint); + break; + case ARCH_MIPS: - if (cpu->cd.mips.cpu_type.isa_level < 3 || - cpu->cd.mips.cpu_type.isa_level == 32) { + if (cpu->is_32bit) { debug("0x%08x", (int)m->cpus[ m->bootstrap_cpu]->pc); if (cpu->cd.mips.gpr[MIPS_GPR_GP] != 0) @@ -1235,46 +1390,24 @@ cpu->cd.mips.gpr[MIPS_GPR_GP]); } break; + case ARCH_PPC: if (cpu->cd.ppc.bits == 32) debug("0x%08x", (int)entrypoint); else debug("0x%016llx", (long long)entrypoint); break; - case ARCH_ARM: - /* ARM cpus aren't 64-bit: */ - debug("0x%08x", (int)entrypoint); - break; - case ARCH_URISC: - { - char tmps[100]; - unsigned char buf[sizeof(uint64_t)]; - - cpu->memory_rw(cpu, m->memory, 0, buf, sizeof(buf), - MEM_READ, CACHE_NONE | NO_EXCEPTIONS); - - entrypoint = 0; - for (i=0; icd.urisc.wordlen/8; i++) { - entrypoint <<= 8; - if (cpu->byte_order == EMUL_BIG_ENDIAN) - entrypoint += buf[i]; - else - entrypoint += buf[cpu-> - cd.urisc.wordlen/8 - 1 - i]; - } - snprintf(tmps, sizeof(tmps), "0x%%0%illx", - cpu->cd.urisc.wordlen / 4); - debug(tmps, (long long)entrypoint); - cpu->pc = entrypoint; - } - break; case ARCH_X86: debug("0x%04x:0x%llx", cpu->cd.x86.s[X86_S_CS], (long long)cpu->pc); break; + default: - debug("0x%016llx", (long long)cpu->pc); + if (cpu->is_32bit) + debug("0x%08x", (int)cpu->pc); + else + debug("0x%016llx", (long long)cpu->pc); } debug("\n"); @@ -1289,7 +1422,7 @@ */ void emul_dumpinfo(struct emul *e) { - int j, nm, iadd = 4; + int j, nm, iadd = DEBUG_INDENTATION; if (e->net != NULL) net_dumpinfo(e->net); @@ -1318,7 +1451,7 @@ */ void emul_simple_init(struct emul *emul) { - int iadd=4; + int iadd = DEBUG_INDENTATION; struct machine *m; if (emul->n_machines != 1) { @@ -1355,34 +1488,14 @@ */ struct emul *emul_create_from_configfile(char *fname) { - int iadd = 4; + int iadd = DEBUG_INDENTATION; struct emul *e = emul_new(fname); - FILE *f; - char buf[128]; - size_t len; debug("Creating emulation from configfile \"%s\":\n", fname); debug_indentation(iadd); - f = fopen(fname, "r"); - if (f == NULL) { - perror(fname); - exit(1); - } - - /* Read header: (must be !!gxemul) */ - len = fread(buf, 1, 8, f); - if (len != 8 || strncmp(buf, "!!gxemul", 8) != 0) { - fprintf(stderr, "%s: must start with '!!gxemul'\n", fname); - exit(1); - } - - /* Restart from beginning: */ - rewind(f); - - emul_parse_config(e, f); + emul_parse_config(e, fname); - fclose(f); debug_indentation(-iadd); return e; } @@ -1409,14 +1522,28 @@ atexit(fix_console); - i = 79; - while (i-- > 0) - debug("-"); - debug("\n\n"); - /* Initialize the interactive debugger: */ debugger_init(emuls, n_emuls); + /* Run any additional debugger commands before starting: */ + for (i=0; in_debugger_cmds > 0) { + int j; + if (i == 0) + print_separator(); + for (j = 0; j < emul->n_debugger_cmds; j ++) { + debug("> %s\n", emul->debugger_cmds[j]); + debugger_execute_cmd(emul->debugger_cmds[j], + strlen(emul->debugger_cmds[j])); + } + } + } + + print_separator(); + debug("\n"); + + /* * console_init_main() makes sure that the terminal is in a * reasonable state. @@ -1441,9 +1568,14 @@ if (e == NULL) continue; for (j=0; jn_machines; j++) - cpu_run_init(e, e->machines[j]); + cpu_run_init(e->machines[j]); } + /* TODO: Generalize: */ + if (emuls[0]->machines[0]->show_trace_tree) + cpu_functioncall_trace(emuls[0]->machines[0]->cpus[0], + emuls[0]->machines[0]->cpus[0]->pc); + /* * MAIN LOOP: * @@ -1453,20 +1585,50 @@ while (go) { go = 0; - x11_check_event(emuls, n_emuls); - - for (i=0; in_machines; j++) { - /* TODO: cpu_run() is a strange name, since - there can be multiple cpus in a machine */ - anything = cpu_run(e, e->machines[j]); - if (anything) - go = 1; - } + /* Flush X11 and serial console output every now and then: */ + if (emuls[0]->machines[0]->ninstrs > + emuls[0]->machines[0]->ninstrs_flush + (1<<19)) { + x11_check_event(emuls, n_emuls); + console_flush(); + emuls[0]->machines[0]->ninstrs_flush = + emuls[0]->machines[0]->ninstrs; + } + + if (emuls[0]->machines[0]->ninstrs > + emuls[0]->machines[0]->ninstrs_show + (1<<25)) { + emuls[0]->machines[0]->ninstrs_since_gettimeofday += + (emuls[0]->machines[0]->ninstrs - + emuls[0]->machines[0]->ninstrs_show); + cpu_show_cycles(emuls[0]->machines[0], 0); + emuls[0]->machines[0]->ninstrs_show = + emuls[0]->machines[0]->ninstrs; + } + + if (single_step == ENTER_SINGLE_STEPPING) { + /* TODO: Cleanup! */ + old_instruction_trace = + emuls[0]->machines[0]->instruction_trace; + old_quiet_mode = quiet_mode; + old_show_trace_tree = + emuls[0]->machines[0]->show_trace_tree; + emuls[0]->machines[0]->instruction_trace = 1; + emuls[0]->machines[0]->show_trace_tree = 1; + quiet_mode = 0; + single_step = SINGLE_STEPPING; + } + + if (single_step == SINGLE_STEPPING) + debugger(); + + e = emuls[0]; /* Note: Only 1 emul supported now. */ + + for (j=0; jn_machines; j++) { + if (e->machines[j]->gdb.port > 0) + debugger_gdb_check_incoming(e->machines[j]); + + anything = machine_run(e->machines[j]); + if (anything) + go = 1; } } @@ -1476,7 +1638,7 @@ if (e == NULL) continue; for (j=0; jn_machines; j++) - cpu_run_deinit(e, e->machines[j]); + cpu_run_deinit(e->machines[j]); } /* force_debugger_at_exit flag set? Then enter the debugger: */