VirtualBox

Changeset 97693 in vbox for trunk/include


Ignore:
Timestamp:
Nov 28, 2022 10:03:17 PM (2 years ago)
Author:
vboxsync
Message:

VMM/DBGF: Added a DBGFBpCheckInstruction function for checking for instruction breakpoint. bugref:9898

Location:
trunk/include
Files:
2 edited

Legend:

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

    r97196 r97693  
    11221122VMM_INT_DECL(bool)          DBGFBpIsInt3Armed(PVM pVM);
    11231123VMM_INT_DECL(bool)          DBGFIsStepping(PVMCPU pVCpu);
     1124VMM_INT_DECL(VBOXSTRICTRC)  DBGFBpCheckInstruction(PVMCC pVM, PVMCPUCC pVCpu, RTGCPTR GCPtrPC);
    11241125VMM_INT_DECL(VBOXSTRICTRC)  DBGFBpCheckIo(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTIOPORT uIoPort, uint8_t cbValue);
    11251126VMM_INT_DECL(VBOXSTRICTRC)  DBGFBpCheckPortIo(PVMCC pVM, PVMCPU pVCpu, RTIOPORT uIoPort,
  • trunk/include/iprt/x86.h

    r97244 r97693  
    11511151
    11521152#ifndef VBOX_FOR_DTRACE_LIB
     1153/** Checks the RW and LEN fields are set up for an instruction breakpoint.
     1154 * @note This does not check if it's enabled. */
     1155# define X86_DR7_IS_EO_CFG(a_uDR7, a_iBp)   ( ((a_uDR7) & (UINT32_C(0x000f0000) << ((a_iBp) * 4))) == 0 )
     1156/** Checks if an instruction breakpoint is enabled and configured correctly.
     1157 * @sa X86_DR7_IS_EO_CFG, X86_DR7_ANY_EO_ENABLED */
     1158# define X86_DR7_IS_EO_ENABLED(a_uDR7, a_iBp) \
     1159    ( ((a_uDR7) & (UINT32_C(0x03) << ((a_iBp) * 2))) != 0 && X86_DR7_IS_EO_CFG(a_uDR7, a_iBp) )
     1160/** Checks if there are any instruction fetch breakpoint types configured in the
     1161 * RW and LEN registers.
     1162 * @sa X86_DR7_IS_EO_CFG, X86_DR7_IS_EO_ENABLED */
     1163# define X86_DR7_ANY_EO_ENABLED(a_uDR7) \
     1164    (   (((a_uDR7) & UINT32_C(0x03)) != 0 && ((a_uDR7) & UINT32_C(0x000f0000)) == 0) \
     1165     || (((a_uDR7) & UINT32_C(0x0c)) != 0 && ((a_uDR7) & UINT32_C(0x00f00000)) == 0) \
     1166     || (((a_uDR7) & UINT32_C(0x30)) != 0 && ((a_uDR7) & UINT32_C(0x0f000000)) == 0) \
     1167     || (((a_uDR7) & UINT32_C(0xc0)) != 0 && ((a_uDR7) & UINT32_C(0xf0000000)) == 0) )
     1168
    11531169/** Checks if there are any I/O breakpoint types configured in the RW
    11541170 * registers.  Does NOT check if these are enabled, sorry. */
     
    11651181AssertCompile(X86_DR7_ANY_RW_IO(UINT32_C(0x00030000)) == 0);
    11661182AssertCompile(X86_DR7_ANY_RW_IO(UINT32_C(0x00040000)) == 0);
     1183
    11671184#endif /* !VBOX_FOR_DTRACE_LIB */
    11681185
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