Commit 8e3a9fd28059821f819295fe9178435990141924

Authored by bellard
1 parent d75d9f6b

monitor fixes (Johannes Schindelin)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1109 c046a42c-6fe2-441c-8c8c-71466251a162
console.c
... ... @@ -570,8 +570,11 @@ void console_select(unsigned int index)
570 570 active_console = s;
571 571 if (s->text_console) {
572 572 if (s->g_width != s->ds->width ||
573   - s->g_height != s->ds->height)
  573 + s->g_height != s->ds->height) {
  574 + s->g_width = s->ds->width;
  575 + s->g_height = s->ds->height;
574 576 text_console_resize(s);
  577 + }
575 578 console_refresh(s);
576 579 }
577 580 }
... ...
... ... @@ -1199,8 +1199,10 @@ CPULogItem cpu_log_items[] = {
1199 1199 { CPU_LOG_PCALL, "pcall",
1200 1200 "show protected mode far calls/returns/exceptions" },
1201 1201 #endif
  1202 +#ifdef DEBUG_IOPORT
1202 1203 { CPU_LOG_IOPORT, "ioport",
1203 1204 "show all i/o ports accesses" },
  1205 +#endif
1204 1206 { 0, NULL, NULL },
1205 1207 };
1206 1208  
... ... @@ -1224,11 +1226,17 @@ int cpu_str_to_log_mask(const char *str)
1224 1226 p1 = strchr(p, ',');
1225 1227 if (!p1)
1226 1228 p1 = p + strlen(p);
  1229 + if(cmp1(p,p1-p,"all")) {
  1230 + for(item = cpu_log_items; item->mask != 0; item++) {
  1231 + mask |= item->mask;
  1232 + }
  1233 + } else {
1227 1234 for(item = cpu_log_items; item->mask != 0; item++) {
1228 1235 if (cmp1(p, p1 - p, item->name))
1229 1236 goto found;
1230 1237 }
1231 1238 return 0;
  1239 + }
1232 1240 found:
1233 1241 mask |= item->mask;
1234 1242 if (*p1 != ',')
... ...
hw/pci.c
... ... @@ -1241,40 +1241,40 @@ static void pci_info_device(PCIDevice *d)
1241 1241 int i, class;
1242 1242 PCIIORegion *r;
1243 1243  
1244   - printf(" Bus %2d, device %3d, function %d:\n",
  1244 + term_printf(" Bus %2d, device %3d, function %d:\n",
1245 1245 d->bus->bus_num, d->devfn >> 3, d->devfn & 7);
1246 1246 class = le16_to_cpu(*((uint16_t *)(d->config + PCI_CLASS_DEVICE)));
1247   - printf(" ");
  1247 + term_printf(" ");
1248 1248 switch(class) {
1249 1249 case 0x0101:
1250   - printf("IDE controller");
  1250 + term_printf("IDE controller");
1251 1251 break;
1252 1252 case 0x0200:
1253   - printf("Ethernet controller");
  1253 + term_printf("Ethernet controller");
1254 1254 break;
1255 1255 case 0x0300:
1256   - printf("VGA controller");
  1256 + term_printf("VGA controller");
1257 1257 break;
1258 1258 default:
1259   - printf("Class %04x", class);
  1259 + term_printf("Class %04x", class);
1260 1260 break;
1261 1261 }
1262   - printf(": PCI device %04x:%04x\n",
  1262 + term_printf(": PCI device %04x:%04x\n",
1263 1263 le16_to_cpu(*((uint16_t *)(d->config + PCI_VENDOR_ID))),
1264 1264 le16_to_cpu(*((uint16_t *)(d->config + PCI_DEVICE_ID))));
1265 1265  
1266 1266 if (d->config[PCI_INTERRUPT_PIN] != 0) {
1267   - printf(" IRQ %d.\n", d->config[PCI_INTERRUPT_LINE]);
  1267 + term_printf(" IRQ %d.\n", d->config[PCI_INTERRUPT_LINE]);
1268 1268 }
1269 1269 for(i = 0;i < PCI_NUM_REGIONS; i++) {
1270 1270 r = &d->io_regions[i];
1271 1271 if (r->size != 0) {
1272   - printf(" BAR%d: ", i);
  1272 + term_printf(" BAR%d: ", i);
1273 1273 if (r->type & PCI_ADDRESS_SPACE_IO) {
1274   - printf("I/O at 0x%04x [0x%04x].\n",
  1274 + term_printf("I/O at 0x%04x [0x%04x].\n",
1275 1275 r->addr, r->addr + r->size - 1);
1276 1276 } else {
1277   - printf("32 bit memory at 0x%08x [0x%08x].\n",
  1277 + term_printf("32 bit memory at 0x%08x [0x%08x].\n",
1278 1278 r->addr, r->addr + r->size - 1);
1279 1279 }
1280 1280 }
... ...
monitor.c
... ... @@ -223,6 +223,7 @@ static void do_info_history (void)
223 223 if (!str)
224 224 break;
225 225 term_printf("%d: '%s'\n", i, str);
  226 + i++;
226 227 }
227 228 }
228 229  
... ...