Changeset 38324 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 5, 2011 2:02:53 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxBFE/MachineDebuggerImpl.cpp
r35346 r38324 128 128 } 129 129 if (!gpVM) 130 {131 130 return E_FAIL; 132 } 133 134 EMRAWMODE rawModeFlag = enable ? EMRAW_RING3_DISABLE : EMRAW_RING3_ENABLE; 135 int rcVBox = VMR3ReqCallWait(gpVM, VMCPUID_ANY, (PFNRT)EMR3RawSetMode, 2, gpVM, rawModeFlag); 136 if (RT_SUCCESS(rcVBox)) 137 return S_OK; 138 139 AssertMsgFailed(("Could not set raw mode flags to %d, rcVBox = %Rrc\n", 140 rawModeFlag, rcVBox)); 141 return E_FAIL; 131 132 int rcVBox = EMR3SetExecutionPolicy(gpVM, EMEXECPOLICY_RECOMPILE_RING3, enable); 133 AssertRCReturn(rcVBox, E_FAIL); 134 return S_OK; 142 135 } 143 136 … … 180 173 } 181 174 if (!gpVM) 182 {183 175 return E_FAIL; 184 } 185 186 EMRAWMODE rawModeFlag = enable ? EMRAW_RING0_DISABLE : EMRAW_RING0_ENABLE; 187 int rcVBox = VMR3ReqCallWait(gpVM, VMCPUID_ANY, (PFNRT)EMR3RawSetMode, 2, gpVM, rawModeFlag); 188 if (RT_SUCCESS(rcVBox)) 189 return S_OK; 190 191 AssertMsgFailed(("Could not set raw mode flags to %d, rcVBox = %Rrc\n", 192 rawModeFlag, rcVBox)); 193 return E_FAIL; 176 177 int rcVBox = EMR3SetExecutionPolicy(gpVM, EMEXECPOLICY_RECOMPILE_RING0, enable); 178 AssertRCReturn(rcVBox, E_FAIL); 179 return S_OK; 194 180 } 195 181 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r38311 r38324 277 277 , mMediaEnumThread (NULL) 278 278 , mIsKWinManaged (false) 279 , mDisablePatm(false) 280 , mDisableCsam(false) 281 , mRecompileSupervisor(false) 282 , mRecompileUser(false) 279 283 , mVerString ("1.0") 280 284 { … … 5124 5128 mShowStartVMErrors = false; 5125 5129 } 5130 else if (!::strcmp(arg, "--disable-patm")) 5131 mDisablePatm = true; 5132 else if (!::strcmp(arg, "--disable-csam")) 5133 mDisableCsam = true; 5134 else if (!::strcmp(arg, "--recompile-supervisor")) 5135 mRecompileSupervisor = true; 5136 else if (!::strcmp(arg, "--recompile-user")) 5137 mRecompileUser = true; 5138 else if (!::strcmp(arg, "--recompile-all")) 5139 mDisablePatm = mDisableCsam = mRecompileSupervisor = mRecompileUser = true; 5126 5140 #ifdef VBOX_WITH_DEBUGGER_GUI 5127 5141 else if (!::strcmp (arg, "-dbg") || !::strcmp (arg, "--dbg")) 5128 {5129 5142 setDebuggerVar(&mDbgEnabled, true); 5130 }5131 5143 else if (!::strcmp( arg, "-debug") || !::strcmp (arg, "--debug")) 5132 5144 { … … 5160 5172 /* Not quite debug options, but they're only useful with the debugger bits. */ 5161 5173 else if (!::strcmp (arg, "--start-paused")) 5162 {5163 5174 mStartPaused = true; 5164 }5165 5175 else if (!::strcmp (arg, "--start-running")) 5166 {5167 5176 mStartPaused = false; 5168 }5169 5177 #endif 5170 5178 /** @todo add an else { msgbox(syntax error); exit(1); } here, pretty please... */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r38222 r38324 178 178 const QRect availableGeometry(int iScreen = 0) const; 179 179 180 bool isPatmDisabled() const { return mDisablePatm; } 181 bool isCsamDisabled() const { return mDisableCsam; } 182 bool isSupervisorCodeExecedRecompiled() const { return mRecompileSupervisor; } 183 bool isUserCodeExecedRecompiled() const { return mRecompileUser; } 184 180 185 #ifdef VBOX_WITH_DEBUGGER_GUI 181 186 bool isDebuggerEnabled(CMachine &aMachine); … … 821 826 bool mIsKWinManaged; 822 827 828 /** The --disable-patm option. */ 829 bool mDisablePatm; 830 /** The --disable-csam option. */ 831 bool mDisableCsam; 832 /** The --recompile-supervisor option. */ 833 bool mRecompileSupervisor; 834 /** The --recompile-user option. */ 835 bool mRecompileUser; 836 823 837 #ifdef VBOX_WITH_DEBUGGER_GUI 824 838 /** Whether the debugger should be accessible or not. -
trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
r38311 r38324 170 170 char szInfo[64]; 171 171 int rc = RTSystemQueryOSInfo (RTSYSOSINFO_RELEASE, szInfo, sizeof(szInfo)); 172 if ( RT_SUCCESS (rc) &&173 szInfo[0] == '1') /* higher than 1x.x.x */172 if ( RT_SUCCESS (rc) 173 && szInfo[0] == '1') /* higher than 1x.x.x */ 174 174 { 175 175 /* … … 272 272 " --start-running start the VM running (for overriding --debug*)\n" 273 273 "\n" 274 # endif 275 "Expert options:\n" 276 " --disable-patm disable code patching (ignored by AMD-V/VT-x)\n" 277 " --disable-csam disable code scanning (ignored by AMD-V/VT-x)\n" 278 " --recompile-supervisor recompiled execution of supervisor code (*)\n" 279 " --recompile-user recompiled execution of user code (*)\n" 280 " --recompile-all recompiled execution of all code, with disabled\n" 281 " code patching and scanning\n" 282 " (*) For AMD-V/VT-x setups the effect is --recompile-all.\n" 283 "\n" 284 # ifdef VBOX_WITH_DEBUGGER_GUI 274 285 "The following environment variables are evaluated:\n" 275 286 " VBOX_GUI_DBG_ENABLED enable the GUI debug menu if set\n" -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r38311 r38324 203 203 CConsole console = session().GetConsole(); 204 204 205 /* Apply debug settings from the command line. */ 206 CMachineDebugger debugger = console.GetDebugger(); 207 if (debugger.isOk()) 208 { 209 if (vboxGlobal().isPatmDisabled()) 210 debugger.SetPATMEnabled(false); 211 if (vboxGlobal().isCsamDisabled()) 212 debugger.SetCSAMEnabled(false); 213 if (vboxGlobal().isSupervisorCodeExecedRecompiled()) 214 debugger.SetRecompileSupervisor(true); 215 if (vboxGlobal().isUserCodeExecedRecompiled()) 216 debugger.SetRecompileUser(true); 217 } 218 205 219 /* Power UP machine: */ 206 220 CProgress progress = vboxGlobal().isStartPausedEnabled() || vboxGlobal().isDebuggerAutoShowEnabled(machine) ? … … 290 304 return; 291 305 } 292 else 293 306 307 setPause(false); 294 308 } 295 309
Note:
See TracChangeset
for help on using the changeset viewer.