diff -Nurb qemu_cvs/console.c qemu_with_cloop/console.c --- qemu_cvs/console.c 2004-10-05 02:13:52.000000000 +0200 +++ qemu_with_cloop/console.c 2004-10-05 02:13:51.000000000 +0200 @@ -570,8 +570,11 @@ active_console = s; if (s->text_console) { if (s->g_width != s->ds->width || - s->g_height != s->ds->height) + s->g_height != s->ds->height) { + s->g_width = s->ds->width; + s->g_height = s->ds->height; text_console_resize(s); + } console_refresh(s); } } diff -Nurb qemu_cvs/exec.c qemu_with_cloop/exec.c --- qemu_cvs/exec.c 2004-10-05 02:13:52.000000000 +0200 +++ qemu_with_cloop/exec.c 2004-10-05 02:13:51.000000000 +0200 @@ -1199,8 +1199,10 @@ { CPU_LOG_PCALL, "pcall", "show protected mode far calls/returns/exceptions" }, #endif +#ifdef DEBUG_IOPORT { CPU_LOG_IOPORT, "ioport", "show all i/o ports accesses" }, +#endif { 0, NULL, NULL }, }; @@ -1224,11 +1226,17 @@ p1 = strchr(p, ','); if (!p1) p1 = p + strlen(p); + if(cmp1(p,p1-p,"all")) { + for(item = cpu_log_items; item->mask != 0; item++) { + mask |= item->mask; + } + } else { for(item = cpu_log_items; item->mask != 0; item++) { if (cmp1(p, p1 - p, item->name)) goto found; } return 0; + } found: mask |= item->mask; if (*p1 != ',') diff -Nurb qemu_cvs/hw/pci.c qemu_with_cloop/hw/pci.c --- qemu_cvs/hw/pci.c 2004-10-05 02:13:52.000000000 +0200 +++ qemu_with_cloop/hw/pci.c 2004-10-05 02:13:48.000000000 +0200 @@ -1241,40 +1241,40 @@ int i, class; PCIIORegion *r; - printf(" Bus %2d, device %3d, function %d:\n", + term_printf(" Bus %2d, device %3d, function %d:\n", d->bus->bus_num, d->devfn >> 3, d->devfn & 7); class = le16_to_cpu(*((uint16_t *)(d->config + PCI_CLASS_DEVICE))); - printf(" "); + term_printf(" "); switch(class) { case 0x0101: - printf("IDE controller"); + term_printf("IDE controller"); break; case 0x0200: - printf("Ethernet controller"); + term_printf("Ethernet controller"); break; case 0x0300: - printf("VGA controller"); + term_printf("VGA controller"); break; default: - printf("Class %04x", class); + term_printf("Class %04x", class); break; } - printf(": PCI device %04x:%04x\n", + term_printf(": PCI device %04x:%04x\n", le16_to_cpu(*((uint16_t *)(d->config + PCI_VENDOR_ID))), le16_to_cpu(*((uint16_t *)(d->config + PCI_DEVICE_ID)))); if (d->config[PCI_INTERRUPT_PIN] != 0) { - printf(" IRQ %d.\n", d->config[PCI_INTERRUPT_LINE]); + term_printf(" IRQ %d.\n", d->config[PCI_INTERRUPT_LINE]); } for(i = 0;i < PCI_NUM_REGIONS; i++) { r = &d->io_regions[i]; if (r->size != 0) { - printf(" BAR%d: ", i); + term_printf(" BAR%d: ", i); if (r->type & PCI_ADDRESS_SPACE_IO) { - printf("I/O at 0x%04x [0x%04x].\n", + term_printf("I/O at 0x%04x [0x%04x].\n", r->addr, r->addr + r->size - 1); } else { - printf("32 bit memory at 0x%08x [0x%08x].\n", + term_printf("32 bit memory at 0x%08x [0x%08x].\n", r->addr, r->addr + r->size - 1); } } diff -Nurb qemu_cvs/monitor.c qemu_with_cloop/monitor.c --- qemu_cvs/monitor.c 2004-10-05 02:13:52.000000000 +0200 +++ qemu_with_cloop/monitor.c 2004-10-05 02:13:51.000000000 +0200 @@ -101,6 +101,16 @@ va_end(ap); } +void term_fprintf(FILE* file, const char *fmt, ...) { + va_list ap; + va_start(ap, fmt); + if(file==stdout) + term_vprintf(fmt, ap); + else + vfprintf(file, fmt, ap); + va_end(ap); +} + static int compare_cmd(const char *name, const char *list) { const char *p, *pstart; @@ -223,6 +233,7 @@ if (!str) break; term_printf("%d: '%s'\n", i, str); + i++; } } diff -Nurb qemu_cvs/target-i386/helper2.c qemu_with_cloop/target-i386/helper2.c --- qemu_cvs/target-i386/helper2.c 2004-10-05 02:13:52.000000000 +0200 +++ qemu_with_cloop/target-i386/helper2.c 2004-10-05 02:13:48.000000000 +0200 @@ -35,6 +35,8 @@ #include #include +#include "vl.h" + _syscall3(int, modify_ldt, int, func, void *, ptr, unsigned long, bytecount) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 66) @@ -175,7 +177,7 @@ static const char *seg_name[6] = { "ES", "CS", "SS", "DS", "FS", "GS" }; eflags = env->eflags; - fprintf(f, "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n" + term_fprintf(f, "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n" "ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n" "EIP=%08x EFL=%08x [%c%c%c%c%c%c%c] CPL=%d II=%d A20=%d\n", env->regs[R_EAX], env->regs[R_EBX], env->regs[R_ECX], env->regs[R_EDX], @@ -193,28 +195,28 @@ (env->a20_mask >> 20) & 1); for(i = 0; i < 6; i++) { SegmentCache *sc = &env->segs[i]; - fprintf(f, "%s =%04x %08x %08x %08x\n", + term_fprintf(f, "%s =%04x %08x %08x %08x\n", seg_name[i], sc->selector, (int)sc->base, sc->limit, sc->flags); } - fprintf(f, "LDT=%04x %08x %08x %08x\n", + term_fprintf(f, "LDT=%04x %08x %08x %08x\n", env->ldt.selector, (int)env->ldt.base, env->ldt.limit, env->ldt.flags); - fprintf(f, "TR =%04x %08x %08x %08x\n", + term_fprintf(f, "TR =%04x %08x %08x %08x\n", env->tr.selector, (int)env->tr.base, env->tr.limit, env->tr.flags); - fprintf(f, "GDT= %08x %08x\n", + term_fprintf(f, "GDT= %08x %08x\n", (int)env->gdt.base, env->gdt.limit); - fprintf(f, "IDT= %08x %08x\n", + term_fprintf(f, "IDT= %08x %08x\n", (int)env->idt.base, env->idt.limit); - fprintf(f, "CR0=%08x CR2=%08x CR3=%08x CR4=%08x\n", + term_fprintf(f, "CR0=%08x CR2=%08x CR3=%08x CR4=%08x\n", env->cr[0], env->cr[2], env->cr[3], env->cr[4]); if (flags & X86_DUMP_CCOP) { @@ -222,16 +224,16 @@ snprintf(cc_op_name, sizeof(cc_op_name), "%s", cc_op_str[env->cc_op]); else snprintf(cc_op_name, sizeof(cc_op_name), "[%d]", env->cc_op); - fprintf(f, "CCS=%08x CCD=%08x CCO=%-8s\n", + term_fprintf(f, "CCS=%08x CCD=%08x CCO=%-8s\n", env->cc_src, env->cc_dst, cc_op_name); } if (flags & X86_DUMP_FPU) { - fprintf(f, "ST0=%f ST1=%f ST2=%f ST3=%f\n", + term_fprintf(f, "ST0=%f ST1=%f ST2=%f ST3=%f\n", (double)env->fpregs[0], (double)env->fpregs[1], (double)env->fpregs[2], (double)env->fpregs[3]); - fprintf(f, "ST4=%f ST5=%f ST6=%f ST7=%f\n", + term_fprintf(f, "ST4=%f ST5=%f ST6=%f ST7=%f\n", (double)env->fpregs[4], (double)env->fpregs[5], (double)env->fpregs[7], diff -Nurb qemu_cvs/vl.h qemu_with_cloop/vl.h --- qemu_cvs/vl.h 2004-10-05 02:13:52.000000000 +0200 +++ qemu_with_cloop/vl.h 2004-10-05 02:13:51.000000000 +0200 @@ -769,6 +769,7 @@ void term_print_help(void); void monitor_readline(const char *prompt, int is_password, char *buf, int buf_size); +void term_fprintf(FILE* file, const char *fmt, ...); /* readline.c */ typedef void ReadLineFunc(void *opaque, const char *str);