Changeset 38324 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Aug 5, 2011 2:02:53 PM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 73340
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/MachineDebuggerImpl.cpp
r35638 r38324 184 184 * @param aEnable new user mode code recompile flag. 185 185 */ 186 STDMETHODIMP MachineDebugger::COMSETTER(RecompileUser) 186 STDMETHODIMP MachineDebugger::COMSETTER(RecompileUser)(BOOL aEnable) 187 187 { 188 188 LogFlowThisFunc(("enable=%d\n", aEnable)); 189 189 190 190 AutoCaller autoCaller(this); 191 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 192 193 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 194 195 if (queueSettings()) 196 { 197 // queue the request 198 mRecompileUserQueued = aEnable; 199 return S_OK; 200 } 201 202 Console::SafeVMPtr pVM (mParent); 203 if (FAILED(pVM.rc())) return pVM.rc(); 204 205 EMRAWMODE rawModeFlag = aEnable ? EMRAW_RING3_DISABLE : EMRAW_RING3_ENABLE; 206 int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)EMR3RawSetMode, 2, pVM.raw(), rawModeFlag); 207 if (RT_SUCCESS(rcVBox)) 208 return S_OK; 209 210 AssertMsgFailed (("Could not set raw mode flags to %d, rcVBox = %Rrc\n", 211 rawModeFlag, rcVBox)); 212 return E_FAIL; 191 HRESULT hrc = autoCaller.rc(); 192 if (SUCCEEDED(hrc)) 193 { 194 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 195 if (queueSettings()) 196 mRecompileUserQueued = aEnable; // queue the request 197 else 198 { 199 Console::SafeVMPtr ptrVM(mParent); 200 hrc = ptrVM.rc(); 201 if (SUCCEEDED(hrc)) 202 { 203 int vrc = EMR3SetExecutionPolicy(ptrVM.raw(), EMEXECPOLICY_RECOMPILE_RING3, RT_BOOL(aEnable)); 204 if (RT_FAILURE(vrc)) 205 hrc = setError(VBOX_E_VM_ERROR, tr("EMR3SetExecutionPolicy failed with %Rrc"), vrc); 206 } 207 } 208 } 209 return hrc; 213 210 } 214 211 … … 244 241 * @param aEnable new recompile supervisor code flag 245 242 */ 246 STDMETHODIMP MachineDebugger::COMSETTER(RecompileSupervisor) 243 STDMETHODIMP MachineDebugger::COMSETTER(RecompileSupervisor)(BOOL aEnable) 247 244 { 248 245 LogFlowThisFunc(("enable=%d\n", aEnable)); 249 246 250 247 AutoCaller autoCaller(this); 251 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 252 253 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 254 255 if (queueSettings()) 256 { 257 // queue the request 258 mRecompileSupervisorQueued = aEnable; 259 return S_OK; 260 } 261 262 Console::SafeVMPtr pVM (mParent); 263 if (FAILED(pVM.rc())) return pVM.rc(); 264 265 EMRAWMODE rawModeFlag = aEnable ? EMRAW_RING0_DISABLE : EMRAW_RING0_ENABLE; 266 int rcVBox = VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)EMR3RawSetMode, 2, pVM.raw(), rawModeFlag); 267 if (RT_SUCCESS(rcVBox)) 268 return S_OK; 269 270 AssertMsgFailed (("Could not set raw mode flags to %d, rcVBox = %Rrc\n", 271 rawModeFlag, rcVBox)); 272 return E_FAIL; 248 HRESULT hrc = autoCaller.rc(); 249 if (SUCCEEDED(hrc)) 250 { 251 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 252 if (queueSettings()) 253 mRecompileSupervisorQueued = aEnable; // queue the request 254 else 255 { 256 Console::SafeVMPtr ptrVM(mParent); 257 hrc = ptrVM.rc(); 258 if (SUCCEEDED(hrc)) 259 { 260 int vrc = EMR3SetExecutionPolicy(ptrVM.raw(), EMEXECPOLICY_RECOMPILE_RING0, RT_BOOL(aEnable)); 261 if (RT_FAILURE(vrc)) 262 hrc = setError(VBOX_E_VM_ERROR, tr("EMR3SetExecutionPolicy failed with %Rrc"), vrc); 263 } 264 } 265 } 266 return hrc; 273 267 } 274 268
Note:
See TracChangeset
for help on using the changeset viewer.