- Timestamp:
- May 22, 2023 1:14:20 PM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/EMR3Dbg.cpp
r99897 r99900 41 41 42 42 43 /** @callback_method_impl{FNDBGCCMD, 44 * Implements the '.alliem' command. } 45 */ 46 static DECLCALLBACK(int) emR3DbgCmdAllIem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs) 43 /** 44 * Common worker for the '.alliem' and '.iemrecompiled' commands. 45 */ 46 static int emR3DbgCmdSetPolicyCommon(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs, 47 EMEXECPOLICY enmPolicy, const char *pszPolicy) 47 48 { 48 49 int rc; … … 51 52 if (cArgs == 0) 52 53 { 53 rc = EMR3QueryExecutionPolicy(pUVM, EMEXECPOLICY_IEM_ALL, &f);54 rc = EMR3QueryExecutionPolicy(pUVM, enmPolicy, &f); 54 55 if (RT_FAILURE(rc)) 55 return DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "EMR3QueryExecutionPolicy(, EMEXECPOLICY_IEM_ALL,");56 DBGCCmdHlpPrintf(pCmdHlp, f ? " alliem: enabled\n" : "alliem: disabled\n");56 return DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "EMR3QueryExecutionPolicy(,%s,", pszPolicy); 57 DBGCCmdHlpPrintf(pCmdHlp, f ? "%s: enabled\n" : "%s: disabled\n", pszPolicy); 57 58 } 58 59 else … … 61 62 if (RT_FAILURE(rc)) 62 63 return DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "DBGCCmdHlpVarToBool"); 63 rc = EMR3SetExecutionPolicy(pUVM, EMEXECPOLICY_IEM_ALL, f);64 rc = EMR3SetExecutionPolicy(pUVM, enmPolicy, f); 64 65 if (RT_FAILURE(rc)) 65 return DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "EMR3SetExecutionPolicy(, EMEXECPOLICY_IEM_ALL,%RTbool)", f);66 return DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "EMR3SetExecutionPolicy(,%s,%RTbool)", pszPolicy, f); 66 67 } 67 68 return VINF_SUCCESS; 69 } 70 71 72 /** @callback_method_impl{FNDBGCCMD, 73 * Implements the '.alliem' command. } 74 */ 75 static DECLCALLBACK(int) emR3DbgCmdAllIem(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs) 76 { 77 return emR3DbgCmdSetPolicyCommon(pCmd, pCmdHlp, pUVM, paArgs, cArgs, EMEXECPOLICY_IEM_ALL, "EMEXECPOLICY_IEM_ALL"); 78 } 79 80 81 /** @callback_method_impl{FNDBGCCMD, 82 * Implements the '.iemrecompiled' command. } 83 */ 84 static DECLCALLBACK(int) emR3DbgCmdIemRecompiled(PCDBGCCMD pCmd, PDBGCCMDHLP pCmdHlp, PUVM pUVM, PCDBGCVAR paArgs, unsigned cArgs) 85 { 86 return emR3DbgCmdSetPolicyCommon(pCmd, pCmdHlp, pUVM, paArgs, cArgs, EMEXECPOLICY_IEM_RECOMPILED, "EMEXECPOLICY_IEM_RECOMPILED"); 68 87 } 69 88 … … 77 96 { 78 97 "alliem", 0, 1, &g_BoolArg, 1, 0, emR3DbgCmdAllIem, "[boolean]", 79 "Enables or disabled executing ALL code in IEM, if no arguments are given it displays the current status." 98 "Enables or disables executing ALL code in IEM, if no arguments are given it displays the current status." 99 }, 100 { 101 "iemrecompiled", 0, 1, &g_BoolArg, 1, 0, emR3DbgCmdIemRecompiled, "[boolean]", 102 "Enables or disables recompiled ALL-in-IEM execution, if no arguments are given it displays the current status." 80 103 }, 81 104 };
Note:
See TracChangeset
for help on using the changeset viewer.