VirtualBox

Changeset 106362 in vbox


Ignore:
Timestamp:
Oct 16, 2024 1:08:09 PM (7 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
165175
Message:

VMM/DBGF: Prepare DBGF to support ARMv8/A64 style breakpoints for the VMM debugger. This converts the x86 centric int3 naming to software breakpoint, bugref:10393

Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/dbgf.h

    r106061 r106362  
    829829    /** Debug register. */
    830830    DBGFBPTYPE_REG,
    831     /** INT 3 instruction. */
    832     DBGFBPTYPE_INT3,
     831    /** Software breakpoint (INT 3 on x86, bkpt on AArch64). */
     832    DBGFBPTYPE_SOFTWARE,
    833833    /** Port I/O breakpoint. */
    834834    DBGFBPTYPE_PORT_IO,
     
    920920        } Reg;
    921921
    922         /** INT3 breakpoint data. */
    923         struct DBGFBPINT3
     922        /** Software breakpoint data. */
     923        struct DBGFBPSW
    924924        {
    925925            /** The flat GC address of the breakpoint. */
     
    927927            /** The physical address of the breakpoint. */
    928928            RTGCPHYS        PhysAddr;
    929             /** The byte value we replaced by the INT 3 instruction. */
    930             uint8_t         bOrg;
    931         } Int3;
     929
     930            /** Architecture specific breakpoint data. */
     931            union
     932            {
     933                /** BKPT breakpoint data. */
     934                struct
     935                {
     936                    /** The original instruction being replaced by the breakpoint. */
     937                    uint32_t        u32Org;
     938                } armv8;
     939                /** Int 3 data. */
     940                struct
     941                {
     942                    /** The byte value we replaced by the INT 3 instruction. */
     943                    uint8_t         bOrg;
     944                } x86;
     945            } Arch;
     946        } Sw;
    932947
    933948        /** I/O port breakpoint data.   */
     
    959974AssertCompileSize(DBGFBPPUB, 64 - 8);
    960975AssertCompileMembersAtSameOffset(DBGFBPPUB, u.GCPtr, DBGFBPPUB, u.Reg.GCPtr);
    961 AssertCompileMembersAtSameOffset(DBGFBPPUB, u.GCPtr, DBGFBPPUB, u.Int3.GCPtr);
     976AssertCompileMembersAtSameOffset(DBGFBPPUB, u.GCPtr, DBGFBPPUB, u.Sw.GCPtr);
    962977
    963978/** Pointer to the visible breakpoint state. */
     
    20472062    DBGFREG_ARMV8_FIRST,
    20482063    /** General purpose registers. */
    2049     DBGFREG_ARMV8_GREG_X0,
     2064    DBGFREG_ARMV8_GREG_X0 = DBGFREG_ARMV8_FIRST,
    20502065    DBGFREG_ARMV8_GREG_W0 = DBGFREG_ARMV8_GREG_X0,
    20512066    DBGFREG_ARMV8_GREG_X1,
  • trunk/include/VBox/vmm/vm.h

    r106061 r106362  
    14801480            uint8_t                     cEnabledHwIoBreakpoints;
    14811481            uint8_t                     au8Alignment1[2]; /**< Alignment padding. */
    1482             /** The number of enabled INT3 breakpoints. */
    1483             uint32_t volatile           cEnabledInt3Breakpoints;
     1482            /** The number of enabled software breakpoints. */
     1483            uint32_t volatile           cEnabledSwBreakpoints;
    14841484        } const     ro;
    14851485#endif
  • trunk/src/VBox/Debugger/DBGCEmulateCodeView.cpp

    r106061 r106362  
    10191019    switch (DBGF_BP_PUB_GET_TYPE(pBp))
    10201020    {
    1021         case DBGFBPTYPE_INT3:
    1022             DBGCCmdHlpPrintf(&pDbgc->CmdHlp, " p %RGv", pBp->u.Int3.GCPtr);
     1021        case DBGFBPTYPE_SOFTWARE:
     1022            DBGCCmdHlpPrintf(&pDbgc->CmdHlp, " p %RGv", pBp->u.Sw.GCPtr);
    10231023            fHasAddress = true;
    10241024            break;
     
    14851485            if (cTries-- > 0)
    14861486                return DBGCCmdHlpFailRc(pCmdHlp, pCmd, rc, "Too many disassembly failures. Giving up");
     1487#if defined(VBOX_VMM_TARGET_ARMV8)
     1488            cbInstr = sizeof(uint32_t);
     1489#else
    14871490            cbInstr = 1;
     1491#endif
    14881492        }
    14891493
  • trunk/src/VBox/VMM/VMMAll/DBGFAll.cpp

    r106061 r106362  
    168168    /** @todo There was a todo here and returning false when I (bird) removed
    169169     *        VBOX_WITH_LOTS_OF_DBGF_BPS, so this might not be correct. */
    170     return pVM->dbgf.s.cEnabledInt3Breakpoints > 0;
     170    return pVM->dbgf.s.cEnabledSwBreakpoints > 0;
    171171}
    172172
  • trunk/src/VBox/VMM/VMMAll/DBGFAllBp.cpp

    r106061 r106362  
    168168
    169169    RT_NOREF(pCtx);
     170#ifdef VBOX_VMM_TARGET_ARMV8
     171    LogFlow(("dbgfBpHit: hit breakpoint %u at %RGv cHits=0x%RX64\n", hBp, pCtx->Pc.u64, cHits));
     172#else
    170173    LogFlow(("dbgfBpHit: hit breakpoint %u at %04x:%RGv cHits=0x%RX64\n", hBp, pCtx->cs.Sel, pCtx->rip, cHits));
     174#endif
    171175
    172176    int rc = VINF_EM_DBG_BREAKPOINT;
     
    186190        if (rcStrict == VINF_SUCCESS)
    187191        {
     192# ifdef VBOX_VMM_TARGET_ARMV8
     193            /** @todo Requires instruction interpreter. */
     194            AssertFailed();
     195# else
    188196            uint8_t abInstr[DBGF_BP_INSN_MAX];
    189197            RTGCPTR const GCPtrInstr = pVCpu->cpum.GstCtx.rip + pVCpu->cpum.GstCtx.cs.u64Base;
     
    215223                else
    216224                    rc = VBOXSTRICTRC_VAL(rcStrict);
     225#endif
    217226            }
    218227        }
     
    365374#endif
    366375            if (   pBp
    367                 && DBGF_BP_PUB_GET_TYPE(&pBp->Pub) == DBGFBPTYPE_INT3)
     376                && DBGF_BP_PUB_GET_TYPE(&pBp->Pub) == DBGFBPTYPE_SOFTWARE)
    368377#ifdef IN_RING3
    369378                return dbgfBpHit(pVM, pVCpu, pCtx, hBp, pBp);
     
    472481
    473482
     483#ifndef VBOX_VMM_TARGET_ARMV8 /** @todo for hardware break-/watchpoints */
    474484/**
    475485 * \#DB (Debug event) handler.
     
    525535    return VINF_EM_RAW_GUEST_TRAP;
    526536}
     537#endif
    527538
    528539
     
    551562    {
    552563        RTGCPTR GCPtrBp;
     564#ifdef VBOX_VMM_TARGET_ARMV8
     565        int rc = VINF_SUCCESS;
     566        GCPtrBp = pCtx->Pc.u64;
     567#else
    553568        int rc = SELMValidateAndConvertCSAddr(pVCpu, pCtx->eflags.u, pCtx->ss.Sel, pCtx->cs.Sel, &pCtx->cs,
    554569                                              pCtx->rip /* no -1 outside non-rawmode */, &GCPtrBp);
    555570        AssertRCReturn(rc, rc);
     571#endif
    556572
    557573        const uint16_t idxL1      = DBGF_BP_INT3_L1_IDX_EXTRACT_FROM_ADDR(GCPtrBp);
     
    574590#endif
    575591                if (   pBp
    576                     && DBGF_BP_PUB_GET_TYPE(&pBp->Pub) == DBGFBPTYPE_INT3)
     592                    && DBGF_BP_PUB_GET_TYPE(&pBp->Pub) == DBGFBPTYPE_SOFTWARE)
    577593                {
    578                     if (pBp->Pub.u.Int3.GCPtr == (RTGCUINTPTR)GCPtrBp)
     594                    if (pBp->Pub.u.Sw.GCPtr == (RTGCUINTPTR)GCPtrBp)
    579595#ifdef IN_RING3
    580596                        rc = dbgfBpHit(pVM, pVCpu, pCtx, hBp, pBp);
  • trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp

    r106061 r106362  
    27772777    {
    27782778        PVMCC pVM = pVCpu->CTX_SUFF(pVM);
    2779         if (pVM->dbgf.ro.cEnabledInt3Breakpoints == 0)
     2779        if (pVM->dbgf.ro.cEnabledSwBreakpoints == 0)
    27802780        { /* likely: No vbox debugger breakpoints */ }
    27812781        else
  • trunk/src/VBox/VMM/VMMAll/VMXAllTemplate.cpp.h

    r106061 r106362  
    1137511375     * INT3 breakpoints - triggered by #BP exceptions.
    1137611376     */
    11377     if (pVM->dbgf.ro.cEnabledInt3Breakpoints > 0)
     11377    if (pVM->dbgf.ro.cEnabledSwBreakpoints > 0)
    1137811378        pDbgState->bmXcptExtra |= RT_BIT_32(X86_XCPT_BP);
    1137911379
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r106061 r106362  
    21802180
    21812181        /* Trap #BP for INT3 debug breakpoints set by the VM debugger. */
    2182         if (pVCpu->CTX_SUFF(pVM)->dbgf.ro.cEnabledInt3Breakpoints)
     2182        if (pVCpu->CTX_SUFF(pVM)->dbgf.ro.cEnabledSwBreakpoints)
    21832183            hmR0SvmSetXcptIntercept(pVmcb, X86_XCPT_BP);
    21842184        else
     
    47564756                && (!VBOXVMM_ANY_PROBES_ENABLED() || !hmR0SvmAnyExpensiveProbesEnabled())
    47574757                && !DBGFIsStepping(pVCpu)
    4758                 && !pVCpu->CTX_SUFF(pVM)->dbgf.ro.cEnabledInt3Breakpoints)
     4758                && !pVCpu->CTX_SUFF(pVM)->dbgf.ro.cEnabledSwBreakpoints)
    47594759                rc = hmR0SvmRunGuestCodeNormal(pVCpu, &cLoops);
    47604760            else
     
    56735673     * INT3 breakpoints - triggered by #BP exceptions.
    56745674     */
    5675     if (pVM->dbgf.ro.cEnabledInt3Breakpoints > 0)
     5675    if (pVM->dbgf.ro.cEnabledSwBreakpoints > 0)
    56765676        pDbgState->bmXcptExtra |= RT_BIT_32(X86_XCPT_BP);
    56775677
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r106061 r106362  
    69966996                && (!VBOXVMM_ANY_PROBES_ENABLED() || !hmR0VmxAnyExpensiveProbesEnabled())
    69976997                && !DBGFIsStepping(pVCpu)
    6998                 && !pVCpu->CTX_SUFF(pVM)->dbgf.ro.cEnabledInt3Breakpoints)
     6998                && !pVCpu->CTX_SUFF(pVM)->dbgf.ro.cEnabledSwBreakpoints)
    69996999                rcStrict = hmR0VmxRunGuestCodeNormal(pVCpu, &cLoops);
    70007000            else
  • trunk/src/VBox/VMM/VMMR3/DBGFR3Bp.cpp

    r106061 r106362  
    177177#include <iprt/assert.h>
    178178#include <iprt/mem.h>
     179#if defined(VBOX_VMM_TARGET_ARMV8)
     180# include <iprt/armv8.h>
     181#endif
    179182
    180183#include "DBGFInline.h"
     
    12351238        AssertStmt(RT_VALID_PTR(pBp2), rc = VERR_DBGF_BP_IPE_7);
    12361239        if (RT_SUCCESS(rc))
    1237             rc = dbgfR3BpInt3L2BstCreate(pUVM, idxL1, u32Entry, hBp, GCPtr, hBp2, pBp2->Pub.u.Int3.GCPtr);
     1240            rc = dbgfR3BpInt3L2BstCreate(pUVM, idxL1, u32Entry, hBp, GCPtr, hBp2, pBp2->Pub.u.Sw.GCPtr);
    12381241    }
    12391242    else if (u8Type == DBGF_BP_INT3_L1_ENTRY_TYPE_L2_IDX)
     
    14461449static int dbgfR3BpInt3Add(PUVM pUVM, DBGFBP hBp, PDBGFBPINT pBp)
    14471450{
    1448     AssertReturn(DBGF_BP_PUB_GET_TYPE(&pBp->Pub) == DBGFBPTYPE_INT3, VERR_DBGF_BP_IPE_3);
     1451    AssertReturn(DBGF_BP_PUB_GET_TYPE(&pBp->Pub) == DBGFBPTYPE_SOFTWARE, VERR_DBGF_BP_IPE_3);
    14491452
    14501453    int rc = VINF_SUCCESS;
    1451     uint16_t idxL1 = DBGF_BP_INT3_L1_IDX_EXTRACT_FROM_ADDR(pBp->Pub.u.Int3.GCPtr);
     1454    uint16_t idxL1 = DBGF_BP_INT3_L1_IDX_EXTRACT_FROM_ADDR(pBp->Pub.u.Sw.GCPtr);
    14521455    uint8_t  cTries = 16;
    14531456
     
    14671470        else
    14681471        {
    1469             rc = dbgfR3BpInt3L2BstNodeAdd(pUVM, idxL1, hBp, pBp->Pub.u.Int3.GCPtr);
     1472            rc = dbgfR3BpInt3L2BstNodeAdd(pUVM, idxL1, hBp, pBp->Pub.u.Sw.GCPtr);
    14701473            if (rc != VINF_TRY_AGAIN)
    14711474                break;
     
    15511554        }
    15521555
    1553         case DBGFBPTYPE_INT3:
     1556        case DBGFBPTYPE_SOFTWARE:
    15541557        {
    15551558            const uint16_t idxL1      = DBGF_BP_INT3_L1_IDX_EXTRACT_FROM_ADDR(GCPtr);
     
    16511654    if (pVCpu->idCpu == 0)
    16521655    {
    1653         uint16_t idxL1 = DBGF_BP_INT3_L1_IDX_EXTRACT_FROM_ADDR(pBp->Pub.u.Int3.GCPtr);
     1656        uint16_t idxL1 = DBGF_BP_INT3_L1_IDX_EXTRACT_FROM_ADDR(pBp->Pub.u.Sw.GCPtr);
    16541657        uint32_t u32Entry = ASMAtomicReadU32(&pUVM->dbgf.s.paBpLocL1R3[idxL1]);
    16551658        AssertReturn(u32Entry != DBGF_BP_INT3_L1_ENTRY_TYPE_NULL, VERR_DBGF_BP_IPE_6);
     
    16751678
    16761679                rc = dbgfR3BpInt3L2BstRemove(pUVM, idxL1, DBGF_BP_INT3_L1_ENTRY_GET_L2_IDX(u32Entry),
    1677                                              hBp, pBp->Pub.u.Int3.GCPtr);
     1680                                             hBp, pBp->Pub.u.Sw.GCPtr);
    16781681            }
    16791682        }
    16801683        else if (u8Type == DBGF_BP_INT3_L1_ENTRY_TYPE_L2_IDX)
    16811684            rc = dbgfR3BpInt3L2BstRemove(pUVM, idxL1, DBGF_BP_INT3_L1_ENTRY_GET_L2_IDX(u32Entry),
    1682                                          hBp, pBp->Pub.u.Int3.GCPtr);
     1685                                         hBp, pBp->Pub.u.Sw.GCPtr);
    16831686    }
    16841687
     
    16971700static int dbgfR3BpInt3Remove(PUVM pUVM, DBGFBP hBp, PDBGFBPINT pBp)
    16981701{
    1699     AssertReturn(DBGF_BP_PUB_GET_TYPE(&pBp->Pub) == DBGFBPTYPE_INT3, VERR_DBGF_BP_IPE_3);
     1702    AssertReturn(DBGF_BP_PUB_GET_TYPE(&pBp->Pub) == DBGFBPTYPE_SOFTWARE, VERR_DBGF_BP_IPE_3);
    17001703
    17011704    /*
     
    18351838            break;
    18361839        }
    1837         case DBGFBPTYPE_INT3:
     1840        case DBGFBPTYPE_SOFTWARE:
    18381841        {
    18391842            dbgfR3BpSetEnabled(pBp, true /*fEnabled*/);
    18401843
    1841             /** @todo When we enable the first int3 breakpoint we should do this in an EMT rendezvous
     1844            /** @todo When we enable the first software breakpoint we should do this in an EMT rendezvous
    18421845             * as the VMX code intercepts #BP only when at least one int3 breakpoint is enabled.
    18431846             * A racing vCPU might trigger it and forward it to the guest causing panics/crashes/havoc. */
     1847#ifdef VBOX_VMM_TARGET_ARMV8
     1848            /*
     1849             * Save original instruction and replace with brk
     1850             */
     1851            rc = PGMPhysSimpleReadGCPhys(pVM, &pBp->Pub.u.Sw.Arch.armv8.u32Org, pBp->Pub.u.Sw.PhysAddr, sizeof(pBp->Pub.u.Sw.Arch.armv8.u32Org));
     1852            if (RT_SUCCESS(rc))
     1853            {
     1854                static const uint32_t s_u32Brk = Armv8A64MkInstrBrk(0xc0de);
     1855                rc = PGMPhysSimpleWriteGCPhys(pVM, pBp->Pub.u.Sw.PhysAddr, &s_u32Brk, sizeof(s_u32Brk));
     1856            }
     1857#else
    18441858            /*
    18451859             * Save current byte and write the int3 instruction byte.
    18461860             */
    1847             rc = PGMPhysSimpleReadGCPhys(pVM, &pBp->Pub.u.Int3.bOrg, pBp->Pub.u.Int3.PhysAddr, sizeof(pBp->Pub.u.Int3.bOrg));
     1861            rc = PGMPhysSimpleReadGCPhys(pVM, &pBp->Pub.u.Sw.Arch.x86.bOrg, pBp->Pub.u.Sw.PhysAddr, sizeof(pBp->Pub.u.Sw.Arch.x86.bOrg));
    18481862            if (RT_SUCCESS(rc))
    18491863            {
    18501864                static const uint8_t s_bInt3 = 0xcc;
    1851                 rc = PGMPhysSimpleWriteGCPhys(pVM, pBp->Pub.u.Int3.PhysAddr, &s_bInt3, sizeof(s_bInt3));
    1852                 if (RT_SUCCESS(rc))
    1853                 {
    1854                     ASMAtomicIncU32(&pVM->dbgf.s.cEnabledInt3Breakpoints);
    1855                     Log(("DBGF: Set breakpoint at %RGv (Phys %RGp)\n", pBp->Pub.u.Int3.GCPtr, pBp->Pub.u.Int3.PhysAddr));
    1856                 }
     1865                rc = PGMPhysSimpleWriteGCPhys(pVM, pBp->Pub.u.Sw.PhysAddr, &s_bInt3, sizeof(s_bInt3));
     1866            }
     1867#endif
     1868            if (RT_SUCCESS(rc))
     1869            {
     1870                ASMAtomicIncU32(&pVM->dbgf.s.cEnabledSwBreakpoints);
     1871                Log(("DBGF: Set breakpoint at %RGv (Phys %RGp)\n", pBp->Pub.u.Sw.GCPtr, pBp->Pub.u.Sw.PhysAddr));
    18571872            }
    18581873
     
    19161931            break;
    19171932        }
    1918         case DBGFBPTYPE_INT3:
     1933        case DBGFBPTYPE_SOFTWARE:
    19191934        {
    19201935            /*
     
    19221937             * We currently ignore invalid bytes.
    19231938             */
     1939#ifdef VBOX_VMM_TARGET_ARMV8
     1940            uint32_t u32Current = 0;
     1941            rc = PGMPhysSimpleReadGCPhys(pVM, &u32Current, pBp->Pub.u.Sw.PhysAddr, sizeof(u32Current));
     1942            if (   RT_SUCCESS(rc)
     1943                && u32Current == Armv8A64MkInstrBrk(0xc0de))
     1944                rc = PGMPhysSimpleWriteGCPhys(pVM, pBp->Pub.u.Sw.PhysAddr, &pBp->Pub.u.Sw.Arch.armv8.u32Org, sizeof(pBp->Pub.u.Sw.Arch.armv8.u32Org));
     1945#else
    19241946            uint8_t bCurrent = 0;
    1925             rc = PGMPhysSimpleReadGCPhys(pVM, &bCurrent, pBp->Pub.u.Int3.PhysAddr, sizeof(bCurrent));
     1947            rc = PGMPhysSimpleReadGCPhys(pVM, &bCurrent, pBp->Pub.u.Sw.PhysAddr, sizeof(bCurrent));
    19261948            if (   RT_SUCCESS(rc)
    19271949                && bCurrent == 0xcc)
    1928             {
    1929                 rc = PGMPhysSimpleWriteGCPhys(pVM, pBp->Pub.u.Int3.PhysAddr, &pBp->Pub.u.Int3.bOrg, sizeof(pBp->Pub.u.Int3.bOrg));
    1930                 if (RT_SUCCESS(rc))
    1931                 {
    1932                     ASMAtomicDecU32(&pVM->dbgf.s.cEnabledInt3Breakpoints);
    1933                     dbgfR3BpSetEnabled(pBp, false /*fEnabled*/);
    1934                     Log(("DBGF: Removed breakpoint at %RGv (Phys %RGp)\n", pBp->Pub.u.Int3.GCPtr, pBp->Pub.u.Int3.PhysAddr));
    1935                 }
     1950                rc = PGMPhysSimpleWriteGCPhys(pVM, pBp->Pub.u.Sw.PhysAddr, &pBp->Pub.u.Sw.Arch.x86.bOrg, sizeof(pBp->Pub.u.Sw.Arch.x86.bOrg));
     1951#endif
     1952
     1953            if (RT_SUCCESS(rc))
     1954            {
     1955                ASMAtomicDecU32(&pVM->dbgf.s.cEnabledSwBreakpoints);
     1956                dbgfR3BpSetEnabled(pBp, false /*fEnabled*/);
     1957                Log(("DBGF: Removed breakpoint at %RGv (Phys %RGp)\n", pBp->Pub.u.Sw.GCPtr, pBp->Pub.u.Sw.PhysAddr));
    19361958            }
    19371959            break;
     
    19771999    {
    19782000        case DBGFBPTYPE_REG:
    1979         case DBGFBPTYPE_INT3:
     2001        case DBGFBPTYPE_SOFTWARE:
    19802002        {
    19812003            if (DBGF_BP_PUB_IS_EXEC_BEFORE(&pBp->Pub))
     
    19892011                if (RT_SUCCESS(rc))
    19902012                {
     2013#ifdef VBOX_VMM_TARGET_ARMV8
     2014                    AssertFailed();
     2015                    rc = VERR_NOT_IMPLEMENTED;
     2016#else
    19912017                    /* Replace the int3 with the original instruction byte. */
    1992                     abInstr[0] = pBp->Pub.u.Int3.bOrg;
     2018                    abInstr[0] = pBp->Pub.u.Sw.Arch.x86.bOrg;
    19932019                    rcStrict = IEMExecOneWithPrefetchedByPC(pVCpu, GCPtrInstr, &abInstr[0], sizeof(abInstr));
     2020#endif
    19942021                    if (   rcStrict == VINF_SUCCESS
    19952022                        && DBGF_BP_PUB_IS_EXEC_AFTER(&pBp->Pub))
     
    21972224
    21982225        PDBGFBPINT pBp = NULL;
    2199         DBGFBP hBp = dbgfR3BpGetByAddr(pUVM, DBGFBPTYPE_INT3, pAddress->FlatPtr, &pBp);
     2226        DBGFBP hBp = dbgfR3BpGetByAddr(pUVM, DBGFBPTYPE_SOFTWARE, pAddress->FlatPtr, &pBp);
    22002227        if (    hBp != NIL_DBGFBP
    2201             &&  pBp->Pub.u.Int3.PhysAddr == GCPhysBpAddr)
     2228            &&  pBp->Pub.u.Sw.PhysAddr == GCPhysBpAddr)
    22022229        {
    22032230            rc = VINF_SUCCESS;
     
    22132240        }
    22142241
    2215         rc = dbgfR3BpAlloc(pUVM, hOwner, pvUser, DBGFBPTYPE_INT3, fFlags, iHitTrigger, iHitDisable, &hBp, &pBp);
     2242        rc = dbgfR3BpAlloc(pUVM, hOwner, pvUser, DBGFBPTYPE_SOFTWARE, fFlags, iHitTrigger, iHitDisable, &hBp, &pBp);
    22162243        if (RT_SUCCESS(rc))
    22172244        {
    2218             pBp->Pub.u.Int3.PhysAddr = GCPhysBpAddr;
    2219             pBp->Pub.u.Int3.GCPtr    = pAddress->FlatPtr;
     2245            pBp->Pub.u.Sw.PhysAddr = GCPhysBpAddr;
     2246            pBp->Pub.u.Sw.GCPtr    = pAddress->FlatPtr;
    22202247
    22212248            /* Add the breakpoint to the lookup tables. */
     
    25952622            break;
    25962623        }
    2597         case DBGFBPTYPE_INT3:
     2624        case DBGFBPTYPE_SOFTWARE:
    25982625        {
    25992626            int rc = dbgfR3BpInt3Remove(pUVM, hBp, pBp);
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin.cpp

    r106061 r106362  
    41174117        && !nemR3DarwinAnyExpensiveProbesEnabled()
    41184118        && !DBGFIsStepping(pVCpu)
    4119         && !pVCpu->CTX_SUFF(pVM)->dbgf.ro.cEnabledInt3Breakpoints)
     4119        && !pVCpu->CTX_SUFF(pVM)->dbgf.ro.cEnabledSwBreakpoints)
    41204120        rcStrict = nemR3DarwinRunGuestNormal(pVM, pVCpu);
    41214121    else
  • trunk/src/VBox/VMM/include/DBGFInternal.h

    r106061 r106362  
    11161116    uint8_t                     cEnabledHwIoBreakpoints;
    11171117    uint8_t                     au8Alignment1[2]; /**< Alignment padding. */
    1118     /** The number of enabled INT3 breakpoints. */
    1119     uint32_t volatile           cEnabledInt3Breakpoints;
     1118    /** The number of enabled software breakpoints. */
     1119    uint32_t volatile           cEnabledSwBreakpoints;
    11201120
    11211121    /** Debugger Attached flag.
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