VirtualBox

Changeset 86699 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Oct 25, 2020 10:44:39 AM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
141083
Message:

VMM/DBGF: Updates to the new breakpoint manager, implement global breakpoint table chunk allocation and register breakpoints which should work again, bugref:9837

Location:
trunk/include/VBox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/err.h

    r86666 r86699  
    331331/** The breakpoint owner handle is still used by one or more breakpoints. */
    332332#define VERR_DBGF_OWNER_BUSY                (-1225)
     333/** Internal processing error \#1 in the DBGF breakpoint manager code. */
     334#define VERR_DBGF_BP_IPE_1                  (-1226)
     335/** Internal processing error \#2 in the DBGF breakpoint manager code. */
     336#define VERR_DBGF_BP_IPE_2                  (-1227)
     337/** Internal processing error \#3 in the DBGF breakpoint manager code. */
     338#define VERR_DBGF_BP_IPE_3                  (-1228)
     339/** Internal processing error \#4 in the DBGF breakpoint manager code. */
     340#define VERR_DBGF_BP_IPE_4                  (-1229)
     341/** Internal processing error \#5 in the DBGF breakpoint manager code. */
     342#define VERR_DBGF_BP_IPE_5                  (-1230)
    333343/** @} */
    334344
  • trunk/include/VBox/vmm/dbgf.h

    r86683 r86699  
    8686
    8787VMMR0_INT_DECL(int) DBGFR0TracerCreateReqHandler(PGVM pGVM, PDBGFTRACERCREATEREQ pReq);
     88
     89#ifdef VBOX_WITH_LOTS_OF_DBGF_BPS
     90/**
     91 * Request buffer for DBGFR0BpInitReqHandler / VMMR0_DO_DBGF_BP_INIT.
     92 * @see DBGFR0BpInitReqHandler.
     93 */
     94typedef struct DBGFBPINITREQ
     95{
     96    /** The header. */
     97    SUPVMMR0REQHDR                  Hdr;
     98    /** Out: Ring-3 pointer of the L1 lookup table on success. */
     99    R3PTRTYPE(volatile uint32_t *)  paBpLocL1R3;
     100} DBGFBPINITREQ;
     101/** Pointer to a DBGFR0BpInitReqHandler / VMMR0_DO_DBGF_BP_INIT request buffer. */
     102typedef DBGFBPINITREQ *PDBGFBPINITREQ;
     103
     104VMMR0_INT_DECL(int) DBGFR0BpInitReqHandler(PGVM pGVM, PDBGFBPINITREQ pReq);
     105
     106/**
     107 * Request buffer for DBGFR0BpChunkAllocReqHandler / VMMR0_DO_DBGF_CHUNK_ALLOC.
     108 * @see DBGFR0BpChunkAllocReqHandler.
     109 */
     110typedef struct DBGFBPCHUNKALLOCREQ
     111{
     112    /** The header. */
     113    SUPVMMR0REQHDR          Hdr;
     114    /** Out: Ring-3 pointer of the chunk base on success. */
     115    R3PTRTYPE(void *)       pChunkBaseR3;
     116
     117    /** The chunk ID to allocate. */
     118    uint32_t                idChunk;
     119} DBGFBPCHUNKALLOCREQ;
     120/** Pointer to a DBGFR0BpChunkAllocReqHandler / VMMR0_DO_DBGF_CHUNK_ALLOC request buffer. */
     121typedef DBGFBPCHUNKALLOCREQ *PDBGFBPCHUNKALLOCREQ;
     122
     123VMMR0_INT_DECL(int) DBGFR0BpChunkAllocReqHandler(PGVM pGVM, PDBGFBPCHUNKALLOCREQ pReq);
     124#endif
    88125/** @} */
    89126
     
    829866     * debugger). */
    830867    DBGFBPOWNER     hOwner;
    831     /** The breakpoint type. */
    832     DBGFBPTYPE      enmType;
    833     /** The breakpoint handle this state belongs to. */
    834     DBGFBP          hBp;
    835     /** Breakpoint flags, see DBGF_BP_F_XXX. */
    836     uint32_t        fFlags;
     868    /** Breakpoint type and flags, see DBGFBPTYPE for type and DBGF_BP_F_XXX for flags.
     869     * Needs to be smashed together to be able to stay in the size limits. */
     870    uint32_t        fFlagsAndType;
    837871
    838872    /** Union of type specific data. */
     
    889923
    890924        /** Padding to the anticipated size. */
    891         uint64_t    u64Padding[3];
     925        uint64_t    u64Padding[2];
    892926    } u;
    893927} DBGFBPPUB;
    894 AssertCompileSize(DBGFBPPUB, 64);
     928AssertCompileSize(DBGFBPPUB, 64 - 8);
    895929AssertCompileMembersAtSameOffset(DBGFBPPUB, u.GCPtr, DBGFBPPUB, u.Reg.GCPtr);
    896930AssertCompileMembersAtSameOffset(DBGFBPPUB, u.GCPtr, DBGFBPPUB, u.Int3.GCPtr);
     
    901935typedef const DBGFBPPUB *PCDBGFBPPUB;
    902936
    903 /** @name Possible DBGFBPPUB::fFlags flags.
     937/** Sets the DBGFPUB::fFlagsAndType member. */
     938#define DBGF_BP_PUB_SET_FLAGS_AND_TYPE(a_enmType, a_fFlags) ((uint32_t)(a_enmType) | (a_fFlags))
     939/** Returns the type of the DBGFPUB::fFlagsAndType member. */
     940#define DBGF_BP_PUB_GET_TYPE(a_fFlagsAndType) ((DBGFBPTYPE)((a_fFlagsAndType) & (UINT32_C(0x7fffffff))))
     941/** Returns the enabled status of DBGFPUB::fFlagsAndType member. */
     942#define DBGF_BP_PUB_IS_ENABLED(a_fFlagsAndType) RT_BOOL((DBGFBPTYPE)((a_fFlagsAndType) & DBGF_BP_F_ENABLED))
     943
     944/** @name Possible DBGFBPPUB::fFlagsAndType flags.
    904945 * @{ */
     946/** Default flags. */
     947#define DBGF_BP_F_DEFAULT                   0
    905948/** Flag whether the breakpoint is enabled currently. */
    906 #define DBGF_BP_F_ENABLED                   RT_BIT_32(0)
     949#define DBGF_BP_F_ENABLED                   RT_BIT_32(31)
    907950/** @} */
     951
    908952
    909953/**
     
    916960 * @param   pVM         The cross-context VM structure pointer.
    917961 * @param   idCpu       ID of the vCPU triggering the breakpoint.
    918  * @param   pvUser      User argument of the set breakpoint.
     962 * @param   pvUserBp    User argument of the set breakpoint.
     963 * @param   hBp         The breakpoint handle.
    919964 * @param   pBpPub      Pointer to the readonly public state of the breakpoint.
    920965 *
     
    923968 *          guru meditation.
    924969 */
    925 typedef DECLCALLBACKTYPE(VBOXSTRICTRC, FNDBGFBPHIT,(PVM pVM, VMCPUID idCpu, void *pvUserBp, PCDBGFBPPUB pBpPub));
     970typedef DECLCALLBACKTYPE(VBOXSTRICTRC, FNDBGFBPHIT,(PVM pVM, VMCPUID idCpu, void *pvUserBp, DBGFBP hBp, PCDBGFBPPUB pBpPub));
    926971/** Pointer to a FNDBGFBPHIT(). */
    927972typedef FNDBGFBPHIT *PFNDBGFBPHIT;
     
    9671012 * @param   pUVM        The user mode VM handle.
    9681013 * @param   pvUser      The user argument.
    969  * @param   pBp         Pointer to the breakpoint information. (readonly)
    970  */
    971 typedef DECLCALLBACKTYPE(int, FNDBGFBPENUM,(PUVM pUVM, PCDBGFBPPUB pBpPub));
     1014 * @param   hBp         The breakpoint handle.
     1015 * @param   pBp         Pointer to the public breakpoint information. (readonly)
     1016 */
     1017typedef DECLCALLBACKTYPE(int, FNDBGFBPENUM,(PUVM pUVM, void *pvUser, DBGFBP hBp, PCDBGFBPPUB pBpPub));
    9721018/** Pointer to a breakpoint enumeration callback function. */
    9731019typedef FNDBGFBPENUM *PFNDBGFBPENUM;
  • trunk/include/VBox/vmm/gvm.h

    r84458 r86699  
    234234        struct DBGFR0PERVM   s;
    235235#endif
    236         uint8_t             padding[64];
     236        uint8_t             padding[1024];
    237237    } dbgfr0;
    238238
    239239    /** Padding so aCpus starts on a page boundrary.  */
    240240#ifdef VBOX_WITH_NEM_R0
    241     uint8_t         abPadding2[4096*2 - 64 - 256 - 1024 - 256 - 64 - 2176 - 640 - 512 - 64 - 64 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];
    242 #else
    243     uint8_t         abPadding2[4096*2 - 64 - 256 - 1024       - 64 - 2176 - 640 - 512 - 64 - 64 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];
     241    uint8_t         abPadding2[4096*2 - 64 - 256 - 1024 - 256 - 64 - 2176 - 640 - 512 - 64 - 1024 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];
     242#else
     243    uint8_t         abPadding2[4096*2 - 64 - 256 - 1024       - 64 - 2176 - 640 - 512 - 64 - 1024 - sizeof(PGVMCPU) * VMM_MAX_CPU_COUNT];
    244244#endif
    245245
  • trunk/include/VBox/vmm/uvm.h

    r82968 r86699  
    148148        struct DBGFUSERPERVM    s;
    149149#endif
    150         uint8_t                 padding[384];
     150        uint8_t                 padding[1024];
    151151    } dbgf;
    152152
  • trunk/include/VBox/vmm/vmm.h

    r86452 r86699  
    431431    /** Call DBGFR0TraceCallReqHandler. */
    432432    VMMR0_DO_DBGF_TRACER_CALL_REQ_HANDLER,
     433    /** Call DBGFR0BpInitReqHandler(). */
     434    VMMR0_DO_DBGF_BP_INIT,
     435    /** Call DBGFR0BpChunkAllocReqHandler(). */
     436    VMMR0_DO_DBGF_BP_CHUNK_ALLOC,
    433437
    434438    /** The usual 32-bit type blow up. */
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