- Timestamp:
- May 1, 2009 1:09:18 PM (16 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 added
- 1 deleted
- 4 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/Makefile.kmk
r18792 r19288 333 333 VMMGC/CPUMGCA.asm \ 334 334 VMMGC/EMGCA.asm \ 335 VMMGC/DBGFGC.cpp \336 335 VMMGC/IOMGC.cpp \ 337 336 VMMGC/MMRamGC.cpp \ … … 345 344 VMMGC/VMMGC.cpp \ 346 345 VMMGC/VMMGCA.asm \ 346 VMMGC/HWACCMGCA.asm \ 347 VMMRZ/DBGFRZ.cpp \ 347 348 VMMAll/CPUMAllRegs.cpp \ 348 349 VMMAll/CPUMAllA.asm \ 349 350 VMMAll/DBGFAll.cpp \ 350 VMMGC/HWACCMGCA.asm \351 351 VMMAll/IOMAll.cpp \ 352 352 VMMAll/IOMAllMMIO.cpp \ … … 427 427 VMMR0/CPUMR0.cpp \ 428 428 VMMR0/CPUMR0A.asm \ 429 VMMR0/DBGFR0.cpp \430 429 VMMR0/GMMR0.cpp \ 431 430 VMMR0/GVMMR0.cpp \ … … 440 439 VMMR0/VMMR0.cpp \ 441 440 VMMR0/VMMR0A.asm \ 441 VMMRZ/DBGFRZ.cpp \ 442 442 VMMAll/CPUMAllA.asm \ 443 443 VMMAll/CPUMAllRegs.cpp \ -
trunk/src/VBox/VMM/VMMGC/TRPMGCHandlers.cpp
r19286 r19288 284 284 * Now leave the rest to the DBGF. 285 285 */ 286 int rc = DBGF GCTrap01Handler(pVM, pVCpu, pRegFrame, uDr6);286 int rc = DBGFRZTrap01Handler(pVM, pVCpu, pRegFrame, uDr6); 287 287 if (rc == VINF_EM_RAW_GUEST_TRAP) 288 288 CPUMSetGuestDR6(pVCpu, uDr6); … … 346 346 } 347 347 } 348 rc = DBGF GCTrap03Handler(pVM, pVCpu, pRegFrame);348 rc = DBGFRZTrap03Handler(pVM, pVCpu, pRegFrame); 349 349 350 350 /* anything we should do with this? Schedule it in GC? */ -
trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp
r19286 r19288 1324 1324 Assert(DBGFIsStepping(pVCpu)); 1325 1325 1326 rc = DBGFR 0Trap01Handler(pVM, pVCpu, CPUMCTX2CORE(pCtx), pCtx->dr[6]);1326 rc = DBGFRZTrap01Handler(pVM, pVCpu, CPUMCTX2CORE(pCtx), pCtx->dr[6]); 1327 1327 if (rc == VINF_EM_RAW_GUEST_TRAP) 1328 1328 { -
trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp
r19286 r19288 2470 2470 uDR6 = X86_DR6_INIT_VAL; 2471 2471 uDR6 |= (exitQualification & (X86_DR6_B0|X86_DR6_B1|X86_DR6_B2|X86_DR6_B3|X86_DR6_BD|X86_DR6_BS)); 2472 rc = DBGFR 0Trap01Handler(pVM, pVCpu, CPUMCTX2CORE(pCtx), uDR6);2472 rc = DBGFRZTrap01Handler(pVM, pVCpu, CPUMCTX2CORE(pCtx), uDR6); 2473 2473 if (rc == VINF_EM_RAW_GUEST_TRAP) 2474 2474 { … … 2501 2501 } 2502 2502 2503 #ifdef DEBUG /* till after branching, enable by default after that. */2504 2503 case X86_XCPT_BP: /* Breakpoint. */ 2505 2504 { 2506 rc = DBGFR 0Trap03Handler(pVM, pVCpu, CPUMCTX2CORE(pCtx));2505 rc = DBGFRZTrap03Handler(pVM, pVCpu, CPUMCTX2CORE(pCtx)); 2507 2506 if (rc == VINF_EM_RAW_GUEST_TRAP) 2508 2507 { … … 2517 2516 break; 2518 2517 } 2519 #endif2520 2518 2521 2519 case X86_XCPT_GP: /* General protection failure exception.*/ -
trunk/src/VBox/VMM/VMMRZ/DBGFRZ.cpp
r19286 r19288 1 1 /* $Id$ */ 2 2 /** @file 3 * DBGF - Debugger Facility, GC part. 4 * 5 * Almost identical to DBGFR0.cpp, except for the fInHyper stuff. 3 * DBGF - Debugger Facility, RZ part. 6 4 */ 7 5 8 6 /* 9 * Copyright (C) 2006-200 7Sun Microsystems, Inc.7 * Copyright (C) 2006-2009 Sun Microsystems, Inc. 10 8 * 11 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 49 47 * @param uDr6 The DR6 register value. 50 48 */ 51 VMMR CDECL(int) DBGFGCTrap01Handler(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame, RTGCUINTREG uDr6)49 VMMRZDECL(int) DBGFRZTrap01Handler(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame, RTGCUINTREG uDr6) 52 50 { 51 #ifdef IN_RC 53 52 const bool fInHyper = !(pRegFrame->ss & X86_SEL_RPL) && !pRegFrame->eflags.Bits.u1VM; 53 #else 54 const bool fInHyper = false; 55 #endif 54 56 55 57 /** @todo Intel docs say that X86_DR6_BS has the highest priority... */ … … 67 69 pVCpu->dbgf.s.iActiveBp = pVM->dbgf.s.aHwBreakpoints[iBp].iBp; 68 70 pVCpu->dbgf.s.fSingleSteppingRaw = false; 69 LogFlow(("DBGF GCTrap03Handler: hit hw breakpoint %d at %04x:%08x\n",70 pVM->dbgf.s.aHwBreakpoints[iBp].iBp, pRegFrame->cs, pRegFrame-> eip));71 LogFlow(("DBGFRZTrap03Handler: hit hw breakpoint %d at %04x:%RGv\n", 72 pVM->dbgf.s.aHwBreakpoints[iBp].iBp, pRegFrame->cs, pRegFrame->rip)); 71 73 72 74 return fInHyper ? VINF_EM_DBG_HYPER_BREAKPOINT : VINF_EM_DBG_BREAKPOINT; … … 83 85 { 84 86 pVCpu->dbgf.s.fSingleSteppingRaw = false; 85 LogFlow(("DBGF GCTrap01Handler: single step at %04x:%08x\n", pRegFrame->cs, pRegFrame->eip));87 LogFlow(("DBGFRZTrap01Handler: single step at %04x:%RGv\n", pRegFrame->cs, pRegFrame->rip)); 86 88 return fInHyper ? VINF_EM_DBG_HYPER_STEPPED : VINF_EM_DBG_STEPPED; 87 89 } … … 91 93 * so we'll bitch if this is not a BS event. 92 94 */ 93 AssertMsg(uDr6 & X86_DR6_BS, ("hey! we're not doing guest BPs yet! dr6=%RTreg %04x:% 08x\n",94 uDr6, pRegFrame->cs, pRegFrame-> eip));95 /** @todo virtualize DRx. */ 96 LogFlow(("DBGF GCTrap01Handler: guest debug event %RTreg at %04x:%08x!\n", uDr6, pRegFrame->cs, pRegFrame->eip));95 AssertMsg(uDr6 & X86_DR6_BS, ("hey! we're not doing guest BPs yet! dr6=%RTreg %04x:%RGv\n", 96 uDr6, pRegFrame->cs, pRegFrame->rip)); 97 98 LogFlow(("DBGFRZTrap01Handler: guest debug event %RTreg at %04x:%RGv!\n", uDr6, pRegFrame->cs, pRegFrame->rip)); 97 99 return fInHyper ? VERR_INTERNAL_ERROR : VINF_EM_RAW_GUEST_TRAP; 98 100 } … … 110 112 * @param pRegFrame Pointer to the register frame for the trap. 111 113 */ 112 VMMR CDECL(int) DBGFGCTrap03Handler(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame)114 VMMRZDECL(int) DBGFRZTrap03Handler(PVM pVM, PVMCPU pVCpu, PCPUMCTXCORE pRegFrame) 113 115 { 116 #ifdef IN_RC 117 const bool fInHyper = !(pRegFrame->ss & X86_SEL_RPL) && !pRegFrame->eflags.Bits.u1VM; 118 #else 119 const bool fInHyper = false; 120 #endif 121 114 122 /* 115 123 * Get the trap address and look it up in the breakpoint table. … … 120 128 RTGCPTR pPc; 121 129 int rc = SELMValidateAndConvertCSAddr(pVM, pRegFrame->eflags, pRegFrame->ss, pRegFrame->cs, &pRegFrame->csHid, 130 #ifdef IN_RC 122 131 (RTGCPTR)((RTGCUINTPTR)pRegFrame->eip - 1), 132 #else 133 (RTGCPTR)pRegFrame->rip /* no -1 in R0 */, 134 #endif 123 135 &pPc); 124 136 AssertRCReturn(rc, rc); … … 132 144 pVCpu->dbgf.s.iActiveBp = pVM->dbgf.s.aBreakpoints[iBp].iBp; 133 145 134 LogFlow(("DBGF GCTrap03Handler: hit breakpoint %d at %RGv (%04x:%08x) cHits=0x%RX64\n",135 pVM->dbgf.s.aBreakpoints[iBp].iBp, pPc, pRegFrame->cs, pRegFrame-> eip,146 LogFlow(("DBGFRZTrap03Handler: hit breakpoint %d at %RGv (%04x:%RGv) cHits=0x%RX64\n", 147 pVM->dbgf.s.aBreakpoints[iBp].iBp, pPc, pRegFrame->cs, pRegFrame->rip, 136 148 pVM->dbgf.s.aBreakpoints[iBp].cHits)); 137 return !(pRegFrame->ss & X86_SEL_RPL) && !pRegFrame->eflags.Bits.u1VM138 ? VINF_EM_DBG_HYPER_BREAKPOINT139 : VINF_EM_DBG_BREAKPOINT;149 return fInHyper 150 ? VINF_EM_DBG_HYPER_BREAKPOINT 151 : VINF_EM_DBG_BREAKPOINT; 140 152 } 141 153 } 142 154 } 143 155 144 return !(pRegFrame->ss & X86_SEL_RPL) && !pRegFrame->eflags.Bits.u1VM145 ? VINF_EM_DBG_HYPER_ASSERTION146 : VINF_EM_RAW_GUEST_TRAP;156 return fInHyper 157 ? VINF_EM_DBG_HYPER_ASSERTION 158 : VINF_EM_RAW_GUEST_TRAP; 147 159 } 148 160
Note:
See TracChangeset
for help on using the changeset viewer.