aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-10-09 17:32:58 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-10-09 17:32:58 +0000
commit8e3a9fd28059821f819295fe9178435990141924 (patch)
treeb8221894d10d2f398990f58e18f029bdceedad55
parentd75d9f6be958f0245ed7794bbd2a31eaffae40da (diff)
monitor fixes (Johannes Schindelin)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1109 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r--console.c5
-rw-r--r--exec.c8
-rw-r--r--hw/pci.c22
-rw-r--r--monitor.c1
4 files changed, 24 insertions, 12 deletions
diff --git a/console.c b/console.c
index 171d2a9379..b99a3bf189 100644
--- a/console.c
+++ b/console.c
@@ -570,8 +570,11 @@ void console_select(unsigned int index)
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 --git a/exec.c b/exec.c
index 8732377abe..0dc8d15952 100644
--- a/exec.c
+++ b/exec.c
@@ -1199,8 +1199,10 @@ CPULogItem cpu_log_items[] = {
{ 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 @@ int cpu_str_to_log_mask(const char *str)
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 --git a/hw/pci.c b/hw/pci.c
index f159dc2cb4..2fed66f0a1 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1241,40 +1241,40 @@ static void pci_info_device(PCIDevice *d)
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 --git a/monitor.c b/monitor.c
index c39f3b2391..27e2619d1c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -223,6 +223,7 @@ static void do_info_history (void)
if (!str)
break;
term_printf("%d: '%s'\n", i, str);
+ i++;
}
}