- Timestamp:
- Jan 31, 2009 1:55:36 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/ldr/ldrkStuff.cpp
r16404 r16439 49 49 #include <k/kLdr.h> 50 50 #include <k/kRdrAll.h> 51 #include <k/kErr.h> 51 52 #include <k/kErrors.h> 52 53 #include <k/kMagics.h> … … 170 171 case KLDR_ERR_SYMBOL_NOT_FOUND: return VERR_SYMBOL_NOT_FOUND; 171 172 case KLDR_ERR_FORWARDER_SYMBOL: return VERR_BAD_EXE_FORMAT; 172 case KLDR_ERR_BAD_FIXUP: return VERR_BAD_EXE_FORMAT;173 case KLDR_ERR_BAD_FIXUP: AssertMsgFailedReturn(("KLDR_ERR_BAD_FIXUP\n"), VERR_BAD_EXE_FORMAT); 173 174 case KLDR_ERR_IMPORT_ORDINAL_OUT_OF_BOUNDS: return VERR_BAD_EXE_FORMAT; 174 175 case KLDR_ERR_NO_DEBUG_INFO: return VERR_FILE_NOT_FOUND; … … 192 193 case KLDR_ERR_NOT_DLL: 193 194 case KLDR_ERR_NOT_EXE: 194 return VERR_GENERAL_FAILURE;195 AssertMsgFailedReturn(("krc=%d (%#x): %s\n", krc, krc, kErrName(krc)), VERR_GENERAL_FAILURE); 195 196 196 197 … … 203 204 case KLDR_ERR_PE_BAD_FIXUP: 204 205 case KLDR_ERR_PE_BAD_IMPORT: 205 return VERR_GENERAL_FAILURE;206 AssertMsgFailedReturn(("krc=%d (%#x): %s\n", krc, krc, kErrName(krc)), VERR_GENERAL_FAILURE); 206 207 207 208 case KLDR_ERR_LX_BAD_HEADER: … … 217 218 case KLDR_ERR_LX_BAD_FORWARDER: 218 219 case KLDR_ERR_LX_NRICHAIN_NOT_SUPPORTED: 219 return VERR_GENERAL_FAILURE;220 AssertMsgFailedReturn(("krc=%d (%#x): %s\n", krc, krc, kErrName(krc)), VERR_GENERAL_FAILURE); 220 221 221 222 case KLDR_ERR_MACHO_OTHER_ENDIAN_NOT_SUPPORTED: … … 238 239 case KLDR_ERR_MACHO_BAD_SYMBOL: 239 240 case KLDR_ERR_MACHO_UNSUPPORTED_FIXUP_TYPE: 240 AssertMsgFailed(("krc=%d (%#x); KLDR_ERR_MACHO_BASE=%d; off=%d\n", krc, krc, KLDR_ERR_MACHO_BASE, krc - KLDR_ERR_MACHO_BASE)); 241 return VERR_GENERAL_FAILURE; 241 AssertMsgFailedReturn(("krc=%d (%#x): %s\n", krc, krc, kErrName(krc)), VERR_GENERAL_FAILURE); 242 242 243 243 default: 244 244 if (RT_FAILURE(krc)) 245 245 return krc; 246 AssertMsgFailed(("krc=%d (%#x)\n", krc, krc)); 247 return VERR_NO_TRANSLATION; 246 AssertMsgFailedReturn(("krc=%d (%#x): %s\n", krc, krc, kErrName(krc)), VERR_NO_TRANSLATION); 248 247 } 249 248 } … … 501 500 } 502 501 503 #if defined(RT_OS_OS2) || (defined(RT_OS_DARWIN) && defined(RT_ARCH_X86))502 #if defined(RT_OS_OS2) || defined(RT_OS_DARWIN) 504 503 /* skip the underscore prefix. */ 505 504 if (*pszSymbol == '_') … … 568 567 } 569 568 570 #if defined(RT_OS_OS2) || (defined(RT_OS_DARWIN) && defined(RT_ARCH_X86))569 #if defined(RT_OS_OS2) || defined(RT_OS_DARWIN) 571 570 /* skip the underscore prefix. */ 572 571 if (*pszSymbol == '_') … … 605 604 KLDRADDR uValue; 606 605 607 #if defined(RT_OS_OS2) || (defined(RT_OS_DARWIN) && defined(RT_ARCH_X86))606 #if defined(RT_OS_OS2) || defined(RT_OS_DARWIN) 608 607 /* 609 608 * Add underscore prefix. … … 663 662 pNewMod->pMod = pMod; 664 663 *phLdrMod = &pNewMod->Core; 664 665 #ifdef LOG_ENABLED 666 Log(("rtldrkLdrOpen: '%s' (%s) %u segments\n", 667 pMod->pszName, pMod->pszFilename, pMod->cSegments)); 668 for (unsigned iSeg = 0; iSeg < pMod->cSegments; iSeg++) 669 { 670 Log(("Segment #%-2u: RVA=%08llx cb=%08llx '%.*s'\n", iSeg, 671 pMod->aSegments[iSeg].RVA, 672 pMod->aSegments[iSeg].cb, 673 pMod->aSegments[iSeg].cchName, 674 pMod->aSegments[iSeg].pchName)); 675 } 676 #endif 665 677 return VINF_SUCCESS; 666 678 }
Note:
See TracChangeset
for help on using the changeset viewer.