VirtualBox

Changeset 104612 in vbox


Ignore:
Timestamp:
May 13, 2024 4:10:11 PM (12 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
163154
Message:

Debugger/DBGCRemoteKd.cpp: Error handling fixes, bugref:3409

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Debugger/DBGCRemoteKd.cpp

    r103433 r104612  
    28662866        if (RT_SUCCESS(rc))
    28672867            rc = DBGFR3RegCpuQueryU16(pThis->Dbgc.pUVM, pThis->Dbgc.idCpu, DBGFREG_FS, &StateChange64.uCtrlReport.Amd64.u16SegFs);
    2868 
    2869         /* Read instruction bytes. */
    2870         StateChange64.uCtrlReport.Amd64.cbInsnStream = sizeof(StateChange64.uCtrlReport.Amd64.abInsn);
    2871         rc = DBGFR3MemRead(pThis->Dbgc.pUVM, pThis->Dbgc.idCpu, &AddrRip,
    2872                            &StateChange64.uCtrlReport.Amd64.abInsn[0], StateChange64.uCtrlReport.Amd64.cbInsnStream);
    28732868        if (RT_SUCCESS(rc))
    28742869        {
    2875             pThis->idPktNext = KD_PACKET_HDR_ID_INITIAL;
    2876             rc = dbgcKdCtxPktSend(pThis, KD_PACKET_HDR_SIGNATURE_DATA, KD_PACKET_HDR_SUB_TYPE_STATE_CHANGE64,
    2877                                   &StateChange64, sizeof(StateChange64), false /*fAck*/);
     2870            /* Read instruction bytes. */
     2871            StateChange64.uCtrlReport.Amd64.cbInsnStream = sizeof(StateChange64.uCtrlReport.Amd64.abInsn);
     2872            rc = DBGFR3MemRead(pThis->Dbgc.pUVM, pThis->Dbgc.idCpu, &AddrRip,
     2873                               &StateChange64.uCtrlReport.Amd64.abInsn[0], StateChange64.uCtrlReport.Amd64.cbInsnStream);
     2874            if (RT_SUCCESS(rc))
     2875            {
     2876                pThis->idPktNext = KD_PACKET_HDR_ID_INITIAL;
     2877                rc = dbgcKdCtxPktSend(pThis, KD_PACKET_HDR_SIGNATURE_DATA, KD_PACKET_HDR_SUB_TYPE_STATE_CHANGE64,
     2878                                      &StateChange64, sizeof(StateChange64), false /*fAck*/);
     2879            }
    28782880        }
    28792881    }
     
    29142916                                                     &Resp.u.GetVersion.u64PtrKernBase,
    29152917                                                     &Resp.u.GetVersion.u64PtrPsLoadedModuleList);
     2918        if (RT_FAILURE(rc))
     2919            LogRel(("DBGC/Kd: Failed to query WIndows version or kernel pointers rc=%Rrc\n", rc));
    29162920    }
    29172921
     
    41154119            }
    41164120
    4117             rc = dbgcKdCtxStateChangeSend(pThis, pEvent->enmType);
     4121            if (RT_SUCCESS(rc))
     4122                rc = dbgcKdCtxStateChangeSend(pThis, pEvent->enmType);
    41184123            break;
    41194124        }
     
    42144219                    else
    42154220                        rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\ndbgf event: %s!", pEvtDesc->pszName);
    4216                     if (pEvent->u.Generic.cArgs <= 1)
    4217                         rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, " arg=%#llx\n", pEvent->u.Generic.auArgs[0]);
    4218                     else
     4221                    if (RT_SUCCESS(rc))
    42194222                    {
    4220                         for (uint32_t i = 0; i < pEvent->u.Generic.cArgs; i++)
    4221                             rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, " args[%u]=%#llx", i, pEvent->u.Generic.auArgs[i]);
    4222                         rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\n");
     4223                        if (pEvent->u.Generic.cArgs <= 1)
     4224                            rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, " arg=%#llx\n", pEvent->u.Generic.auArgs[0]);
     4225                        else
     4226                        {
     4227                            for (uint32_t i = 0; i < pEvent->u.Generic.cArgs; i++)
     4228                                rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, " args[%u]=%#llx", i, pEvent->u.Generic.auArgs[i]);
     4229                            if (RT_SUCCESS(rc))
     4230                                rc = pDbgc->CmdHlp.pfnPrintf(&pDbgc->CmdHlp, NULL, "\n");
     4231                        }
    42234232                    }
    42244233                }
Note: See TracChangeset for help on using the changeset viewer.

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