Changeset 35188 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Dec 16, 2010 3:13:07 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 69027
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PDMLdr.cpp
r34286 r35188 295 295 * Load the loader item. 296 296 */ 297 char szErr[4096+1024]; 298 rc = SUPR3HardenedLdrLoadPlugIn(pModule->szFilename, &pModule->hLdrMod, szErr, sizeof(szErr)); 297 RTERRINFOSTATIC ErrInfo; 298 RTErrInfoInitStatic(&ErrInfo); 299 rc = SUPR3HardenedLdrLoadPlugIn(pModule->szFilename, &pModule->hLdrMod, &ErrInfo.Core); 299 300 if (RT_SUCCESS(rc)) 300 301 { … … 306 307 /* Something went wrong, most likely module not found. Don't consider other unlikely errors */ 307 308 rc = VMSetError(pUVM->pVM, rc, RT_SRC_POS, 308 N_("Unable to load R3 module %s (%s): %s"), pModule->szFilename, pszName, szErr);309 N_("Unable to load R3 module %s (%s): %s"), pModule->szFilename, pszName, ErrInfo.Core.pszMsg); 309 310 RTMemFree(pModule); 310 311 } … … 483 484 * Open the loader item. 484 485 */ 485 char szErr[4096+1024]; 486 int rc = SUPR3HardenedVerifyPlugIn(pszFilename, szErr, sizeof(szErr)); 486 RTERRINFOSTATIC ErrInfo; 487 RTErrInfoInitStatic(&ErrInfo); 488 int rc = SUPR3HardenedVerifyPlugIn(pszFilename, &ErrInfo.Core); 487 489 if (RT_SUCCESS(rc)) 488 490 { 489 szErr[0] = '\0';491 RTErrInfoClear(&ErrInfo.Core); 490 492 rc = RTLdrOpen(pszFilename, 0, RTLDRARCH_X86_32, &pModule->hLdrMod); 491 493 } … … 565 567 566 568 /* Don't consider VERR_PDM_MODULE_NAME_CLASH and VERR_NO_MEMORY above as these are very unlikely. */ 567 if (RT_FAILURE(rc) && szErr[0])568 rc = VMSetError(pVM, rc, RT_SRC_POS, N_("Cannot load RC module %s: %s"), pszFilename, szErr);569 if (RT_FAILURE(rc) && RTErrInfoIsSet(&ErrInfo.Core)) 570 rc = VMSetError(pVM, rc, RT_SRC_POS, N_("Cannot load RC module %s: %s"), pszFilename, ErrInfo.Core.pszMsg); 569 571 else if (RT_FAILURE(rc)) 570 572 rc = VMSetError(pVM, rc, RT_SRC_POS, N_("Cannot load RC module %s"), pszFilename); … … 633 635 * Ask the support library to load it. 634 636 */ 635 char szErr[4096+1024]; 636 void *pvImageBase; 637 int rc = SUPR3LoadModule(pszFilename, pszName, &pvImageBase, szErr, sizeof(szErr)); 637 void *pvImageBase; 638 RTERRINFOSTATIC ErrInfo; 639 RTErrInfoInitStatic(&ErrInfo); 640 int rc = SUPR3LoadModule(pszFilename, pszName, &pvImageBase, &ErrInfo.Core); 638 641 if (RT_SUCCESS(rc)) 639 642 { … … 662 665 RTCritSectLeave(&pUVM->pdm.s.ListCritSect); 663 666 RTMemFree(pModule); 664 LogRel(("pdmR3LoadR0U: pszName=\"%s\" rc=%Rrc szErr=\"%s\"\n", pszName, rc, szErr));667 LogRel(("pdmR3LoadR0U: pszName=\"%s\" rc=%Rrc szErr=\"%s\"\n", pszName, rc, ErrInfo.Core.pszMsg)); 665 668 666 669 /* Don't consider VERR_PDM_MODULE_NAME_CLASH and VERR_NO_MEMORY above as these are very unlikely. */ 667 670 if (RT_FAILURE(rc) && pUVM->pVM) /** @todo VMR3SetErrorU. */ 668 rc = VMSetError(pUVM->pVM, rc, RT_SRC_POS, N_("Cannot load R0 module %s: %s"), pszFilename, szErr);671 rc = VMSetError(pUVM->pVM, rc, RT_SRC_POS, N_("Cannot load R0 module %s: %s"), pszFilename, ErrInfo.Core.pszMsg); 669 672 670 673 RTMemTmpFree(pszFile); /* might be reference thru pszFilename in the above VMSetError call. */
Note:
See TracChangeset
for help on using the changeset viewer.