- Timestamp:
- Jun 29, 2016 1:51:13 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/MachineDebuggerImpl.cpp
r61786 r61935 1359 1359 if (SUCCEEDED(hrc)) 1360 1360 { 1361 /* Suspend the VM first or we risk deadlocks or inconsistent guest stacks. */ 1362 alock.release(); 1363 int vrc = VMR3Suspend(ptrVM.rawUVM(), VMSUSPENDREASON_USER); 1364 alock.acquire(); 1361 /* 1362 * There is currently a problem with the windows diggers and SMP, where 1363 * guest driver memory is being read from CPU zero in order to ensure that 1364 * we've got a consisten virtual memory view. If one of the other CPUs 1365 * initiates a rendezvous while we're unwinding the stack and trying to 1366 * read guest driver memory, we will deadlock. 1367 * 1368 * So, check the VM state and maybe suspend the VM before we continue. 1369 */ 1370 int vrc = VINF_SUCCESS; 1371 bool fPaused = false; 1372 if (aCpuId != 0) 1373 { 1374 VMSTATE enmVmState = VMR3GetStateU(ptrVM.rawUVM()); 1375 if ( enmVmState == VMSTATE_RUNNING 1376 || enmVmState == VMSTATE_RUNNING_LS 1377 || enmVmState == VMSTATE_RUNNING_FT) 1378 { 1379 alock.release(); 1380 vrc = VMR3Suspend(ptrVM.rawUVM(), VMSUSPENDREASON_USER); 1381 alock.acquire(); 1382 fPaused = RT_SUCCESS(vrc); 1383 } 1384 } 1365 1385 if (RT_SUCCESS(vrc)) 1366 1386 { 1367 1387 PCDBGFSTACKFRAME pFirstFrame; 1368 1369 1388 vrc = DBGFR3StackWalkBegin(ptrVM.rawUVM(), aCpuId, DBGFCODETYPE_GUEST, &pFirstFrame); 1370 1389 if (RT_SUCCESS(vrc)) … … 1456 1475 hrc = setError(E_FAIL, tr("DBGFR3StackWalkBegin failed with %Rrc"), vrc); 1457 1476 1458 alock.release(); 1459 VMR3Resume(ptrVM.rawUVM(), VMRESUMEREASON_USER); 1460 alock.acquire(); 1477 /* 1478 * Resume the VM if we suspended it. 1479 */ 1480 if (fPaused) 1481 { 1482 alock.release(); 1483 VMR3Resume(ptrVM.rawUVM(), VMRESUMEREASON_USER); 1484 } 1461 1485 } 1462 1486 else
Note:
See TracChangeset
for help on using the changeset viewer.