VirtualBox

Changeset 86666 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Oct 21, 2020 3:01:32 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
141042
Message:

include/VBox,VMM,DBGF: Some boilerplate for the new breakpoint manager which is disabled by default (can be built with VBOX_WITH_LOTS_OF_DBGF_BPS), bugref:9837

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/DBGFInternal.h

    r86098 r86666  
    747747
    748748
     749#ifndef VBOX_WITH_LOTS_OF_DBGF_BPS
    749750/**
    750751 * Breakpoint search optimization.
     
    761762/** Pointer to a breakpoint search optimziation structure. */
    762763typedef DBGFBPSEARCHOPT *PDBGFBPSEARCHOPT;
     764#else
     765/**
     766 * Hardware breakpoint state.
     767 */
     768typedef struct DBGFBPHW
     769{
     770    /** The flat GC address of the breakpoint. */
     771    RTGCUINTPTR     GCPtr;
     772    /** The breakpoint handle if active, NIL_DBGFBP if disabled. */
     773    DBGFBP          hBp;
     774    /** The access type (one of the X86_DR7_RW_* value). */
     775    uint8_t         fType;
     776    /** The access size. */
     777    uint8_t         cb;
     778    /** Flag whether the breakpoint is currently enabled. */
     779    bool            fEnabled;
     780    /** Padding. */
     781    uint8_t         bPad;
     782} DBGFBPHW;
     783AssertCompileSize(DBGFBPHW, 16);
     784/** Pointer to a hardware breakpoint state. */
     785typedef DBGFBPHW *PDBGFBPHW;
     786/** Pointer to a const hardware breakpoint state. */
     787typedef const DBGFBPHW *PCDBGFBPHW;
     788#endif
    763789
    764790
     
    790816    /** The number of enabled hardware I/O breakpoints. */
    791817    uint8_t                     cEnabledHwIoBreakpoints;
     818#ifndef VBOX_WITH_LOTS_OF_DBGF_BPS
    792819    /** The number of enabled INT3 breakpoints. */
    793820    uint8_t                     cEnabledInt3Breakpoints;
    794821    uint8_t                     abPadding; /**< Unused padding space up for grabs. */
     822#else
     823    uint16_t                    u16Pad;
     824#endif
    795825    uint32_t                    uPadding;
    796826
     
    830860    uint32_t                    u32Padding[2]; /**< Alignment padding. */
    831861
     862#ifndef VBOX_WITH_LOTS_OF_DBGF_BPS
    832863    /** Array of hardware breakpoints. (0..3)
    833864     * This is shared among all the CPUs because life is much simpler that way. */
     
    843874    /** INT3 breakpoint search optimizations. */
    844875    DBGFBPSEARCHOPT             Int3;
     876#else
     877    /** Array of hardware breakpoints (0..3).
     878     * This is shared among all the CPUs because life is much simpler that way. */
     879    DBGFBPHW                    aHwBreakpoints[4];
     880#endif
    845881
    846882    /**
     
    907943    uint32_t                offVM;
    908944
     945#ifndef VBOX_WITH_LOTS_OF_DBGF_BPS
    909946    /** Current active breakpoint (id).
    910947     * This is ~0U if not active. It is set when a execution engine
     
    915952     * @todo drop this in favor of aEvents!  */
    916953    uint32_t                iActiveBp;
     954#else
     955    /** Current active breakpoint handle.
     956     * This is NIL_DBGFBP if not active. It is set when a execution engine
     957     * encounters a breakpoint and returns VINF_EM_DBG_BREAKPOINT.
     958     *
     959     * @todo drop this in favor of aEvents!  */
     960    DBGFBP                  hBpActive;
     961#endif
    917962    /** Set if we're singlestepping in raw mode.
    918963     * This is checked and cleared in the \#DB handler. */
     
    10921137void dbgfR3AsTerm(PUVM pUVM);
    10931138void dbgfR3AsRelocate(PUVM pUVM, RTGCUINTPTR offDelta);
     1139#ifdef VBOX_WITH_LOTS_OF_DBGF_BPS
     1140DECLHIDDEN(int) dbgfR3BpInit(PVM pVM);
     1141DECLHIDDEN(int) dbgfR3BpTerm(PVM pVM);
     1142#else
    10941143int  dbgfR3BpInit(PVM pVM);
     1144#endif
    10951145int  dbgfR3InfoInit(PUVM pUVM);
    10961146int  dbgfR3InfoTerm(PUVM pUVM);
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