Changeset 91520 in vbox for trunk/src/VBox
- Timestamp:
- Oct 1, 2021 2:49:17 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/VM.cpp
r90794 r91520 3319 3319 * Complain about it. 3320 3320 */ 3321 const char * const pszStateCur = VMR3GetStateName(enmStateCur); 3321 3322 if (cTransitions == 1) 3322 3323 { 3323 LogRel(("%s: %s -> %s failed, because the VM state is actually %s\n", 3324 pszWho, VMR3GetStateName(enmStateOld), VMR3GetStateName(enmStateNew), VMR3GetStateName(enmStateCur))); 3325 VMSetError(pVM, VERR_VM_INVALID_VM_STATE, RT_SRC_POS, 3326 N_("%s failed because the VM state is %s instead of %s"), 3327 pszWho, VMR3GetStateName(enmStateCur), VMR3GetStateName(enmStateOld)); 3324 LogRel(("%s: %s -> %s failed, because the VM state is actually %s!\n", 3325 pszWho, VMR3GetStateName(enmStateOld), VMR3GetStateName(enmStateNew), pszStateCur)); 3326 VMSetError(pVM, VERR_VM_INVALID_VM_STATE, RT_SRC_POS, N_("%s failed because the VM state is %s instead of %s"), 3327 pszWho, pszStateCur, VMR3GetStateName(enmStateOld)); 3328 3328 AssertMsgFailed(("%s: %s -> %s failed, because the VM state is actually %s\n", 3329 pszWho, VMR3GetStateName(enmStateOld), VMR3GetStateName(enmStateNew), VMR3GetStateName(enmStateCur)));3329 pszWho, VMR3GetStateName(enmStateOld), VMR3GetStateName(enmStateNew), pszStateCur)); 3330 3330 } 3331 3331 else 3332 3332 { 3333 char szTransitions[4096]; 3334 size_t cchTransitions = 0; 3335 szTransitions[0] = '\0'; 3333 3336 va_end(va); 3334 3337 va_start(va, cTransitions); 3335 LogRel(("%s:\n", pszWho));3336 3338 for (unsigned i = 0; i < cTransitions; i++) 3337 3339 { 3338 3340 enmStateNew = (VMSTATE)va_arg(va, /*VMSTATE*/int); 3339 3341 enmStateOld = (VMSTATE)va_arg(va, /*VMSTATE*/int); 3340 LogRel(("%s%s -> %s", 3341 i ? ", " : " ", VMR3GetStateName(enmStateOld), VMR3GetStateName(enmStateNew))); 3342 const char * const pszStateNew = VMR3GetStateName(enmStateNew); 3343 const char * const pszStateOld = VMR3GetStateName(enmStateOld); 3344 LogRel(("%s%s -> %s", i ? ", " : " ", pszStateOld, pszStateNew)); 3345 cchTransitions += RTStrPrintf(&szTransitions[cchTransitions], sizeof(szTransitions) - cchTransitions, 3346 "%s%s -> %s", i ? ", " : " ", pszStateOld, pszStateNew); 3342 3347 } 3343 LogRel((" failed, because the VM state is actually %s\n", VMR3GetStateName(enmStateCur))); 3348 Assert(cchTransitions < sizeof(szTransitions) - 64); 3349 3350 LogRel(("%s: %s failed, because the VM state is actually %s!\n", pszWho, szTransitions, pszStateCur)); 3344 3351 VMSetError(pVM, VERR_VM_INVALID_VM_STATE, RT_SRC_POS, 3345 N_("%s failed because the current VM state, %s, was not found in the state transition table ( old state%s)"),3346 pszWho, VMR3GetStateName(enmStateCur), VMR3GetStateName(enmStateOld));3347 AssertMsgFailed(("%s - state=%s, see release log for full details. Check the cTransitions passed us.\n",3348 pszWho, VMR3GetStateName(enmStateCur)));3352 N_("%s failed because the current VM state, %s, was not found in the state transition table (%s)"), 3353 pszWho, pszStateCur, szTransitions); 3354 AssertMsgFailed(("%s - state=%s, transitions: %s. Check the cTransitions passed us.\n", 3355 pszWho, pszStateCur, szTransitions)); 3349 3356 } 3350 3357 }
Note:
See TracChangeset
for help on using the changeset viewer.