VirtualBox

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


Ignore:
Timestamp:
Jan 27, 2013 9:12:53 PM (12 years ago)
Author:
vboxsync
Message:

DBGF,DBGC,++: PVM -> PUVM. Some refactoring and cleanup as well.

File:
1 edited

Legend:

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

    r39154 r44399  
    233233    DBGFCMDDATA                 VMMCmdData;
    234234
    235     /** List of registered info handlers. */
    236     R3PTRTYPE(PDBGFINFO)        pInfoFirst;
    237     /** Critical section protecting the above list. */
    238     RTCRITSECT                  InfoCritSect;
    239 
    240235    /** Range tree containing the loaded symbols of the a VM.
    241236     * This tree will never have blind spots. */
     
    259254     * @remark This is currently a fixed size array for reasons of simplicity. */
    260255    DBGFBP                      aBreakpoints[32];
    261 
     256} DBGF;
     257/** Pointer to DBGF Data. */
     258typedef DBGF *PDBGF;
     259
     260
     261/** Converts a DBGFCPU pointer into a VM pointer. */
     262#define DBGFCPU_2_VM(pDbgfCpu) ((PVM)((uint8_t *)(pDbgfCpu) + (pDbgfCpu)->offVM))
     263
     264/**
     265 * The per CPU data for DBGF.
     266 */
     267typedef struct DBGFCPU
     268{
     269    /** The offset into the VM structure.
     270     * @see DBGFCPU_2_VM(). */
     271    uint32_t                offVM;
     272
     273    /** Current active breakpoint (id).
     274     * This is ~0U if not active. It is set when a execution engine
     275     * encounters a breakpoint and returns VINF_EM_DBG_BREAKPOINT. This is
     276     * currently not used for REM breakpoints because of the lazy coupling
     277     * between VBox and REM. */
     278    uint32_t                iActiveBp;
     279    /** Set if we're singlestepping in raw mode.
     280     * This is checked and cleared in the \#DB handler. */
     281    bool                    fSingleSteppingRaw;
     282
     283    /** Padding the structure to 16 bytes. */
     284    bool                    afReserved[7];
     285} DBGFCPU;
     286/** Pointer to DBGFCPU data. */
     287typedef DBGFCPU *PDBGFCPU;
     288
     289
     290/**
     291 * The DBGF data kept in the UVM.
     292 */
     293typedef struct DBGFUSERPERVM
     294{
    262295    /** The address space database lock. */
    263296    RTSEMRW                     hAsDbLock;
     
    293326    /** The head of the Guest OS digger instances. */
    294327    R3PTRTYPE(PDBGFOS)          pOSHead;
    295 } DBGF;
    296 /** Pointer to DBGF Data. */
    297 typedef DBGF *PDBGF;
    298 
    299 
    300 /** Converts a DBGFCPU pointer into a VM pointer. */
    301 #define DBGFCPU_2_VM(pDbgfCpu) ((PVM)((uint8_t *)(pDbgfCpu) + (pDbgfCpu)->offVM))
    302 
    303 /**
    304  * The per CPU data for DBGF.
    305  */
    306 typedef struct DBGFCPU
    307 {
    308     /** The offset into the VM structure.
    309      * @see DBGFCPU_2_VM(). */
    310     uint32_t                offVM;
    311 
    312     /** Current active breakpoint (id).
    313      * This is ~0U if not active. It is set when a execution engine
    314      * encounters a breakpoint and returns VINF_EM_DBG_BREAKPOINT. This is
    315      * currently not used for REM breakpoints because of the lazy coupling
    316      * between VBox and REM. */
    317     uint32_t                iActiveBp;
    318     /** Set if we're singlestepping in raw mode.
    319      * This is checked and cleared in the \#DB handler. */
    320     bool                    fSingleSteppingRaw;
    321 
    322     /** Padding the structure to 16 bytes. */
    323     bool                    afReserved[7];
    324 
     328
     329    /** List of registered info handlers. */
     330    R3PTRTYPE(PDBGFINFO)        pInfoFirst;
     331    /** Critical section protecting the above list. */
     332    RTCRITSECT                  InfoCritSect;
     333
     334} DBGFUSERPERVM;
     335
     336/**
     337 * The per-CPU DBGF data kept in the UVM.
     338 */
     339typedef struct DBGFUSERPERVMCPU
     340{
    325341    /** The guest register set for this CPU.  Can be NULL. */
    326342    R3PTRTYPE(struct DBGFREGSET *) pGuestRegSet;
    327343    /** The hypervisor register set for this CPU.  Can be NULL. */
    328344    R3PTRTYPE(struct DBGFREGSET *) pHyperRegSet;
    329 } DBGFCPU;
    330 /** Pointer to DBGFCPU data. */
    331 typedef DBGFCPU *PDBGFCPU;
    332 
    333 
    334 int  dbgfR3AsInit(PVM pVM);
    335 void dbgfR3AsTerm(PVM pVM);
    336 void dbgfR3AsRelocate(PVM pVM, RTGCUINTPTR offDelta);
     345} DBGFUSERPERVMCPU;
     346
     347
     348int  dbgfR3AsInit(PUVM pUVM);
     349void dbgfR3AsTerm(PUVM pUVM);
     350void dbgfR3AsRelocate(PUVM pUVM, RTGCUINTPTR offDelta);
    337351int  dbgfR3BpInit(PVM pVM);
    338 int  dbgfR3InfoInit(PVM pVM);
    339 int  dbgfR3InfoTerm(PVM pVM);
    340 void dbgfR3OSTerm(PVM pVM);
    341 int  dbgfR3RegInit(PVM pVM);
    342 void dbgfR3RegTerm(PVM pVM);
     352int  dbgfR3InfoInit(PUVM pUVM);
     353int  dbgfR3InfoTerm(PUVM pUVM);
     354void dbgfR3OSTerm(PUVM pUVM);
     355int  dbgfR3RegInit(PUVM pUVM);
     356void dbgfR3RegTerm(PUVM pUVM);
    343357int  dbgfR3SymInit(PVM pVM);
    344358int  dbgfR3SymTerm(PVM pVM);
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