diff options
| author | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2011-12-20 21:46:30 +0000 |
|---|---|---|
| committer | vboxsync <vboxsync@cfe28804-0f27-0410-a406-dd0f0b0b656f> | 2011-12-20 21:46:30 +0000 |
| commit | cecba875de2322fbda781cb0ec6ae592d1700a85 (patch) | |
| tree | dc10fa94da81980023eab1cdcb3ccc6cd2a16af6 /src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp | |
| parent | d44f8fde092ae2558b22da427ad54984b60a8041 (diff) | |
| download | VirtualBox-svn-cecba875de2322fbda781cb0ec6ae592d1700a85.tar.gz | |
Implemented the log setting properties (read-only).
git-svn-id: https://www.virtualbox.org/svn/vbox/trunk@39668 cfe28804-0f27-0410-a406-dd0f0b0b656f
Diffstat (limited to 'src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp')
| -rw-r--r-- | src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp b/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp index 90a540452c4..8f3d6ee767e 100644 --- a/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp +++ b/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp @@ -404,6 +404,54 @@ static RTEXITCODE handleDebugVM_SetRegisters(HandlerArg *pArgs, IMachineDebugger } /** + * Handles the show sub-command. + * + * @returns Suitable exit code. + * @param pArgs The handler arguments. + * @param pDebugger Pointer to the debugger interface. + */ +static RTEXITCODE handleDebugVM_Show(HandlerArg *pArgs, IMachineDebugger *pDebugger) +{ + if (pArgs->argc != 3) + return errorSyntax(USAGE_DEBUGVM, "The show sub-command takes exactly one argument"); + + const char *pszWhat = pArgs->argv[2]; + if ( !strcmp(pszWhat, "log-settings") + || !strcmp(pszWhat, "logdbg-settings")) + { + com::Bstr bstrFlags; + CHECK_ERROR2_RET(pDebugger, COMGETTER(LogDbgFlags)(bstrFlags.asOutParam()), RTEXITCODE_FAILURE); + com::Bstr bstrGroups; + CHECK_ERROR2_RET(pDebugger, COMGETTER(LogDbgGroups)(bstrGroups.asOutParam()), RTEXITCODE_FAILURE); + com::Bstr bstrDestinations; + CHECK_ERROR2_RET(pDebugger, COMGETTER(LogDbgDestinations)(bstrDestinations.asOutParam()), RTEXITCODE_FAILURE); + RTPrintf("Debug log settings:\n"); + RTPrintf(" VBOX_LOG=%ls\n" + " VBOX_LOG_FLAGS=%ls\n" + " VBOX_LOG_DEST=%ls\n" + , bstrGroups.raw(), bstrFlags.raw(), bstrDestinations.raw()); + } + else if (!strcmp(pszWhat, "logrel-settings")) + { + com::Bstr bstrFlags; + CHECK_ERROR2_RET(pDebugger, COMGETTER(LogRelFlags)(bstrFlags.asOutParam()), RTEXITCODE_FAILURE); + com::Bstr bstrGroups; + CHECK_ERROR2_RET(pDebugger, COMGETTER(LogRelGroups)(bstrGroups.asOutParam()), RTEXITCODE_FAILURE); + com::Bstr bstrDestinations; + CHECK_ERROR2_RET(pDebugger, COMGETTER(LogRelDestinations)(bstrDestinations.asOutParam()), RTEXITCODE_FAILURE); + RTPrintf("Release log settings:\n"); + RTPrintf(" VBOX_RELEASE_LOG=%ls\n" + " VBOX_RELEASE_LOG_FLAGS=%ls\n" + " VBOX_RELEASE_LOG_DEST=%ls\n" + , bstrGroups.raw(), bstrFlags.raw(), bstrDestinations.raw()); + } + else + return errorSyntax(USAGE_DEBUGVM, "The show sub-command has no idea what '%s' might be", pszWhat); + + return RTEXITCODE_SUCCESS; +} + +/** * Handles the statistics sub-command. * * @returns Suitable exit code. @@ -526,6 +574,8 @@ int handleDebugVM(HandlerArg *pArgs) rcExit = handleDebugVM_OSInfo(pArgs, ptrDebugger); else if (!strcmp(pszSubCmd, "setregisters")) rcExit = handleDebugVM_SetRegisters(pArgs, ptrDebugger); + else if (!strcmp(pszSubCmd, "show")) + rcExit = handleDebugVM_Show(pArgs, ptrDebugger); else if (!strcmp(pszSubCmd, "statistics")) rcExit = handleDebugVM_Statistics(pArgs, ptrDebugger); else |
