VirtualBox

Changeset 60872 in vbox


Ignore:
Timestamp:
May 7, 2016 5:52:54 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
107084
Message:

DBGF: Allow attaching the debugger via the GUI during the dbgfR3WaitForAttach countdown.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/DBGF.cpp

    r60626 r60872  
    327327 * @returns True is a debugger have attached.
    328328 * @param   pVM         The cross context VM structure.
     329 * @param   pVCpu       The cross context per CPU structure.
    329330 * @param   enmEvent    Event.
    330  */
    331 bool dbgfR3WaitForAttach(PVM pVM, DBGFEVENTTYPE enmEvent)
     331 *
     332 * @thread  EMT(pVCpu)
     333 */
     334bool dbgfR3WaitForAttach(PVM pVM, PVMCPU pVCpu, DBGFEVENTTYPE enmEvent)
    332335{
    333336    /*
     
    359362        }
    360363
     364        /* Process priority stuff. */
     365        if (   VM_FF_IS_PENDING(pVM, VM_FF_REQUEST)
     366            || VMCPU_FF_IS_PENDING(pVCpu, VMCPU_FF_REQUEST))
     367        {
     368            int rc = VMR3ReqProcessU(pVM->pUVM, VMCPUID_ANY, true /*fPriorityOnly*/);
     369            if (rc == VINF_SUCCESS)
     370                rc = VMR3ReqProcessU(pVM->pUVM, pVCpu->idCpu, true /*fPriorityOnly*/);
     371            if (rc != VINF_SUCCESS)
     372            {
     373                RTStrmPrintf(g_pStdErr, "[rcReq=%Rrc, ignored!]", rc);
     374                RTStrmFlush(g_pStdErr);
     375            }
     376        }
     377
    361378        /* next */
    362379        if (!(cWait % 10))
     
    481498     */
    482499    if (    !pVM->dbgf.s.fAttached
    483         &&  !dbgfR3WaitForAttach(pVM, enmEvent))
     500        &&  !dbgfR3WaitForAttach(pVM, pVCpu, enmEvent))
    484501    {
    485502        Log(("DBGFR3VMMEventSrc: enmEvent=%d - debugger not attached\n", enmEvent));
     
    9891006    /*
    9901007     * Call the VM, use EMT for serialization.
     1008     *
     1009     * Using a priority call here so we can actually attach a debugger during
     1010     * the countdown in dbgfR3WaitForAttach.
    9911011     */
    9921012    /** @todo SMP */
    993     return VMR3ReqCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3Attach, 1, pVM);
     1013    return VMR3ReqPriorityCallWait(pVM, VMCPUID_ANY, (PFNRT)dbgfR3Attach, 1, pVM);
    9941014}
    9951015
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