Changeset 92747 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Dec 5, 2021 7:16:31 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 148658
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevFdc.cpp
r87773 r92747 684 684 uint8_t data_dir; 685 685 uint8_t eot; /* last wanted sector */ 686 /* Debugging only */ 687 uint8_t cur_cmd; 688 uint8_t prev_cmd; 686 689 /* States kept only to be returned back */ 687 690 /* Timers state */ … … 1068 1071 fdctrl->data_pos = 0; 1069 1072 fdctrl->msr &= ~(FD_MSR_CMDBUSY | FD_MSR_DIO); 1073 fdctrl->prev_cmd = fdctrl->cur_cmd; 1074 fdctrl->cur_cmd = 0; 1070 1075 } 1071 1076 … … 2189 2194 fdctrl->data_len = handlers[pos].parameters + 1; 2190 2195 fdctrl->msr |= FD_MSR_CMDBUSY; 2196 fdctrl->cur_cmd = value & 0xff; 2191 2197 } 2192 2198 … … 2365 2371 } 2366 2372 return VERR_IOM_IOPORT_UNUSED; 2373 } 2374 2375 2376 /* -=-=-=-=-=-=-=-=- Debugger callback -=-=-=-=-=-=-=-=- */ 2377 2378 /** 2379 * FDC debugger info callback. 2380 * 2381 * @param pDevIns The device instance. 2382 * @param pHlp The output helpers. 2383 * @param pszArgs The arguments. 2384 */ 2385 static DECLCALLBACK(void) fdcInfo(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs) 2386 { 2387 fdctrl_t *pThis = PDMDEVINS_2_DATA(pDevIns, fdctrl_t *); 2388 unsigned i; 2389 bool fVerbose = false; 2390 2391 /* Parse arguments. */ 2392 if (pszArgs) 2393 fVerbose = strstr(pszArgs, "verbose") != NULL; 2394 2395 /* Show basic information. */ 2396 pHlp->pfnPrintf(pHlp, "%s#%d: ", 2397 pDevIns->pReg->szName, 2398 pDevIns->iInstance); 2399 pHlp->pfnPrintf(pHlp, "I/O=%X IRQ=%u DMA=%u ", 2400 pThis->io_base, 2401 pThis->irq_lvl, 2402 pThis->dma_chann); 2403 pHlp->pfnPrintf(pHlp, "RC=%RTbool R0=%RTbool\n", pDevIns->fRCEnabled, pDevIns->fR0Enabled); 2404 2405 /* Print register contents. */ 2406 pHlp->pfnPrintf(pHlp, "Registers: MSR=%02X DSR=%02X DOR=%02X\n", 2407 pThis->msr, pThis->dsr, pThis->dor); 2408 pHlp->pfnPrintf(pHlp, " DIR=%02X\n", 2409 fdctrl_read_dir(pThis)); 2410 2411 /* Print the current command, if any. */ 2412 if (pThis->cur_cmd) 2413 pHlp->pfnPrintf(pHlp, "Curr cmd: %02X (%s)\n", 2414 pThis->cur_cmd, 2415 handlers[command_to_handler[pThis->cur_cmd]].name); 2416 pHlp->pfnPrintf(pHlp, "Prev cmd: %02X (%s)\n", 2417 pThis->prev_cmd, 2418 handlers[command_to_handler[pThis->prev_cmd]].name); 2419 2420 2421 for (i = 0; i < pThis->num_floppies; ++i) 2422 { 2423 fdrive_t *drv = &pThis->drives[i]; 2424 pHlp->pfnPrintf(pHlp, " Drive %u state:\n", i); 2425 pHlp->pfnPrintf(pHlp, " Medium : %u tracks, %u sectors\n", 2426 drv->max_track, 2427 drv->last_sect); 2428 pHlp->pfnPrintf(pHlp, " Current: track %u, head %u, sector %u\n", 2429 drv->track, 2430 drv->head, 2431 drv->sect); 2432 } 2367 2433 } 2368 2434 … … 3002 3068 rc = PDMDevHlpSSMRegister(pDevIns, FDC_SAVESTATE_CURRENT, sizeof(*pThis), fdcSaveExec, fdcLoadExec); 3003 3069 AssertRCReturn(rc, rc); 3070 3071 /* 3072 * Register the debugger info callback. 3073 */ 3074 PDMDevHlpDBGFInfoRegister(pDevIns, "fdc", "FDC info", fdcInfo); 3004 3075 3005 3076 /*
Note:
See TracChangeset
for help on using the changeset viewer.