VirtualBox

Changeset 39668 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Dec 20, 2011 9:46:30 PM (13 years ago)
Author:
vboxsync
Message:

Implemented the log setting properties (read-only).

Location:
trunk/src/VBox/Frontends/VBoxManage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageDebugVM.cpp

    r39650 r39668  
    400400        RTPrintf("Successfully set %u registers\n", aBstrNames.size());
    401401    }
     402
     403    return RTEXITCODE_SUCCESS;
     404}
     405
     406/**
     407 * Handles the show sub-command.
     408 *
     409 * @returns Suitable exit code.
     410 * @param   pArgs               The handler arguments.
     411 * @param   pDebugger           Pointer to the debugger interface.
     412 */
     413static RTEXITCODE handleDebugVM_Show(HandlerArg *pArgs, IMachineDebugger *pDebugger)
     414{
     415    if (pArgs->argc != 3)
     416        return errorSyntax(USAGE_DEBUGVM, "The show sub-command takes exactly one argument");
     417
     418    const char *pszWhat = pArgs->argv[2];
     419    if (   !strcmp(pszWhat, "log-settings")
     420        || !strcmp(pszWhat, "logdbg-settings"))
     421    {
     422        com::Bstr bstrFlags;
     423        CHECK_ERROR2_RET(pDebugger, COMGETTER(LogDbgFlags)(bstrFlags.asOutParam()), RTEXITCODE_FAILURE);
     424        com::Bstr bstrGroups;
     425        CHECK_ERROR2_RET(pDebugger, COMGETTER(LogDbgGroups)(bstrGroups.asOutParam()), RTEXITCODE_FAILURE);
     426        com::Bstr bstrDestinations;
     427        CHECK_ERROR2_RET(pDebugger, COMGETTER(LogDbgDestinations)(bstrDestinations.asOutParam()), RTEXITCODE_FAILURE);
     428        RTPrintf("Debug log settings:\n");
     429        RTPrintf("        VBOX_LOG=%ls\n"
     430                 "  VBOX_LOG_FLAGS=%ls\n"
     431                 "   VBOX_LOG_DEST=%ls\n"
     432                 , bstrGroups.raw(), bstrFlags.raw(), bstrDestinations.raw());
     433    }
     434    else if (!strcmp(pszWhat, "logrel-settings"))
     435    {
     436        com::Bstr bstrFlags;
     437        CHECK_ERROR2_RET(pDebugger, COMGETTER(LogRelFlags)(bstrFlags.asOutParam()), RTEXITCODE_FAILURE);
     438        com::Bstr bstrGroups;
     439        CHECK_ERROR2_RET(pDebugger, COMGETTER(LogRelGroups)(bstrGroups.asOutParam()), RTEXITCODE_FAILURE);
     440        com::Bstr bstrDestinations;
     441        CHECK_ERROR2_RET(pDebugger, COMGETTER(LogRelDestinations)(bstrDestinations.asOutParam()), RTEXITCODE_FAILURE);
     442        RTPrintf("Release log settings:\n");
     443        RTPrintf("        VBOX_RELEASE_LOG=%ls\n"
     444                 "  VBOX_RELEASE_LOG_FLAGS=%ls\n"
     445                 "   VBOX_RELEASE_LOG_DEST=%ls\n"
     446                 , bstrGroups.raw(), bstrFlags.raw(), bstrDestinations.raw());
     447    }
     448    else
     449        return errorSyntax(USAGE_DEBUGVM, "The show sub-command has no idea what '%s' might be", pszWhat);
    402450
    403451    return RTEXITCODE_SUCCESS;
     
    527575            else if (!strcmp(pszSubCmd, "setregisters"))
    528576                rcExit = handleDebugVM_SetRegisters(pArgs, ptrDebugger);
     577            else if (!strcmp(pszSubCmd, "show"))
     578                rcExit = handleDebugVM_Show(pArgs, ptrDebugger);
    529579            else if (!strcmp(pszSubCmd, "statistics"))
    530580                rcExit = handleDebugVM_Statistics(pArgs, ptrDebugger);
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r39650 r39668  
    652652                     "                            getregisters [--cpu <id>] <reg>|all ... |\n"
    653653                     "                            setregisters [--cpu <id>] <reg>=<value> ... |\n"
     654                     "                            show <logdbg-settings|logrel-settings> |\n"
    654655                     "                            statistics [--reset] [--pattern <pattern>]\n"
    655656                     "                            [--descriptions]\n"
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette