VirtualBox

Changeset 9793 in vbox for trunk/src/VBox/VMM/CPUM.cpp


Ignore:
Timestamp:
Jun 18, 2008 3:26:42 PM (16 years ago)
Author:
vboxsync
Message:

Properly display the current guest instruction during a guru dump.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/CPUM.cpp

    r9790 r9793  
    9191static DECLCALLBACK(void) cpumR3InfoAll(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
    9292static DECLCALLBACK(void) cpumR3InfoGuest(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
     93static DECLCALLBACK(void) cpumR3InfoGuestInstr(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
    9394static DECLCALLBACK(void) cpumR3InfoHyper(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
    9495static DECLCALLBACK(void) cpumR3InfoHost(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs);
     
    195196     * Register info handlers.
    196197     */
    197     DBGFR3InfoRegisterInternal(pVM, "cpum",         "Displays the all the cpu states.",    &cpumR3InfoAll);
    198     DBGFR3InfoRegisterInternal(pVM, "cpumguest",    "Displays the guest cpu state.",       &cpumR3InfoGuest);
    199     DBGFR3InfoRegisterInternal(pVM, "cpumhyper",    "Displays the hypervisor cpu state.",  &cpumR3InfoHyper);
    200     DBGFR3InfoRegisterInternal(pVM, "cpumhost",     "Displays the host cpu state.",        &cpumR3InfoHost);
    201     DBGFR3InfoRegisterInternal(pVM, "cpuid",        "Displays the guest cpuid leaves.",    &cpumR3CpuIdInfo);
     198    DBGFR3InfoRegisterInternal(pVM, "cpum",             "Displays the all the cpu states.",         &cpumR3InfoAll);
     199    DBGFR3InfoRegisterInternal(pVM, "cpumguest",        "Displays the guest cpu state.",            &cpumR3InfoGuest);
     200    DBGFR3InfoRegisterInternal(pVM, "cpumhyper",        "Displays the hypervisor cpu state.",       &cpumR3InfoHyper);
     201    DBGFR3InfoRegisterInternal(pVM, "cpumhost",         "Displays the host cpu state.",             &cpumR3InfoHost);
     202    DBGFR3InfoRegisterInternal(pVM, "cpuid",            "Displays the guest cpuid leaves.",         &cpumR3CpuIdInfo);
     203    DBGFR3InfoRegisterInternal(pVM, "cpumguestinstr",   "Displays the current guest instruction.",  &cpumR3InfoGuestInstr);
    202204
    203205    /*
     
    970972{
    971973    cpumR3InfoGuest(pVM, pHlp, pszArgs);
     974    cpumR3InfoGuestInstr(pVM, pHlp, pszArgs);
    972975    cpumR3InfoHyper(pVM, pHlp, pszArgs);
    973976    cpumR3InfoHost(pVM, pHlp, pszArgs);
     
    10311034    cpumR3InfoOne(pVM, &pVM->cpum.s.Guest, CPUMCTX2CORE(&pVM->cpum.s.Guest), pHlp, enmType, "");
    10321035
     1036    char szInstruction[256];
     1037    int rc = DBGFR3DisasInstrCurrent(pVM, szInstruction, sizeof(szInstruction));
     1038    if (VBOX_SUCCESS(rc))
     1039        pHlp->pfnPrintf(pHlp, "\nCPUM: %s\n\n", szInstruction);
     1040}
     1041
     1042/**
     1043 * Display the current guest instruction
     1044 *
     1045 * @param   pVM         VM Handle.
     1046 * @param   pHlp        The info helper functions.
     1047 * @param   pszArgs     Arguments, ignored.
     1048 */
     1049static DECLCALLBACK(void) cpumR3InfoGuestInstr(PVM pVM, PCDBGFINFOHLP pHlp, const char *pszArgs)
     1050{
    10331051    char szInstruction[256];
    10341052    int rc = DBGFR3DisasInstrCurrent(pVM, szInstruction, sizeof(szInstruction));
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