Changeset 14796 in vbox for trunk/src/VBox/Devices
- Timestamp:
- Nov 28, 2008 5:23:45 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Graphics/DevVGA.cpp
r13840 r14796 4299 4299 } 4300 4300 4301 4301 /** 4302 * Info handler, device version. Dumps VGA memory formatted as 4303 * ASCII text, no attributes. Only looks at the first page. 4304 * 4305 * @param pDevIns Device instance which registered the info. 4306 * @param pHlp Callback functions for doing output. 4307 * @param pszArgs Argument string. Optional and specific to the handler. 4308 */ 4309 static DECLCALLBACK(void) vgaInfoText(PPDMDEVINS pDevIns, PCDBGFINFOHLP pHlp, const char *pszArgs) 4310 { 4311 PVGASTATE pThis = PDMINS_2_DATA(pDevIns, PVGASTATE); 4312 uint8_t *src; 4313 unsigned row, col; 4314 unsigned num_rows = 25, num_cols = 80; 4315 4316 /* Pure paranoia... */ 4317 Assert(num_rows * num_cols * 8 <= pThis->vram_size); 4318 4319 src = pThis->vram_ptrR3; 4320 if (src) { 4321 for (col = 0; col < num_cols; ++col) pHlp->pfnPrintf(pHlp, "-"); pHlp->pfnPrintf(pHlp, "\n"); 4322 for (row = 0; row < num_rows; ++row) { 4323 for (col = 0; col < num_cols; ++col) { 4324 pHlp->pfnPrintf(pHlp, "%c", *src); 4325 src += 8; /* chars are spaced 8 bytes apart */ 4326 } 4327 pHlp->pfnPrintf(pHlp, "\n"); 4328 } 4329 for (col = 0; col < num_cols; ++col) pHlp->pfnPrintf(pHlp, "-"); pHlp->pfnPrintf(pHlp, "\n"); 4330 } 4331 else 4332 { 4333 pHlp->pfnPrintf(pHlp, "VGA memory not available!\n"); 4334 } 4335 } 4302 4336 4303 4337 … … 5733 5767 if (RT_FAILURE(rc)) 5734 5768 return rc; 5769 5770 /* 5771 * Register debugger info callback. 5772 */ 5773 PDMDevHlpDBGFInfoRegister(pDevIns, "vgatext", "Display VGA memory formatted as text.", vgaInfoText); 5735 5774 5736 5775 /*
Note:
See TracChangeset
for help on using the changeset viewer.