Logo Search packages:      
Sourcecode: virtualbox-ose version File versions

dbgf.h File Reference


Detailed Description

DBGF - Debugger Facility.

Definition in file dbgf.h.

#include <VBox/cdefs.h>
#include <VBox/types.h>
#include <VBox/vmm.h>
#include <VBox/log.h>
#include <VBox/dbgfsel.h>
#include <iprt/stdarg.h>
#include <iprt/dbg.h>

Go to the source code of this file.

Classes

struct  DBGFADDRESS
struct  DBGFBP
struct  DBGFEVENT
struct  DBGFINFOHLP
struct  DBGFLINE
struct  DBGFOSREG
struct  DBGFSTACKFRAME
struct  DBGFSYMBOL

Defines

#define DBGF_SEL_FLAT   1
#define DBGF_SYMBOL_NAME_LENGTH   512
#define DBGFOSREG_MAGIC   0x19830808
#define DBGFR3DisasInstrCurrentLog(pVCpu, pszPrefix)   do { } while (0)
#define DBGFR3DisasInstrLog(pVCpu, Sel, GCPtr)   do { } while (0)
#define DBGFR3InfoLog(pVM, pszName, pszArgs)   do { } while (0)
#define DBGFSTOP(pVM)   VINF_SUCCESS
Address spaces aliases.
#define DBGF_AS_ALIAS_2_INDEX(hAlias)   ( (uintptr_t)(hAlias) - (uintptr_t)DBGF_AS_FIRST )
#define DBGF_AS_COUNT   (6U)
#define DBGF_AS_FIRST   DBGF_AS_RC_AND_GC_GLOBAL
#define DBGF_AS_GLOBAL   ((RTDBGAS)-1)
#define DBGF_AS_IS_ALIAS(hAlias)   ( DBGF_AS_ALIAS_2_INDEX(hAlias) < DBGF_AS_COUNT )
#define DBGF_AS_IS_FIXED_ALIAS(hAlias)   ( DBGF_AS_ALIAS_2_INDEX(hAlias) < (uintptr_t)DBGF_AS_PHYS - (uintptr_t)DBGF_AS_FIRST + 1U )
#define DBGF_AS_KERNEL   ((RTDBGAS)-2)
#define DBGF_AS_LAST   DBGF_AS_GLOBAL
#define DBGF_AS_PHYS   ((RTDBGAS)-3)
#define DBGF_AS_R0   ((RTDBGAS)-5)
#define DBGF_AS_RC   ((RTDBGAS)-4)
#define DBGF_AS_RC_AND_GC_GLOBAL   ((RTDBGAS)-6)
#define DBGF_DISAS_FLAGS_CURRENT_GUEST   RT_BIT(0)
#define DBGF_DISAS_FLAGS_CURRENT_HYPER   RT_BIT(1)
#define DBGF_DISAS_FLAGS_NO_ADDRESS   RT_BIT(5)
#define DBGF_DISAS_FLAGS_NO_ANNOTATION   RT_BIT(2)
#define DBGF_DISAS_FLAGS_NO_BYTES   RT_BIT(4)
#define DBGF_DISAS_FLAGS_NO_SYMBOLS   RT_BIT(3)
DBGFADDRESS Flags.
#define DBGFADDRESS_FLAGS_FAR16   0
#define DBGFADDRESS_FLAGS_FAR32   1
#define DBGFADDRESS_FLAGS_FAR64   2
#define DBGFADDRESS_FLAGS_FLAT   3
#define DBGFADDRESS_FLAGS_HMA   RT_BIT(4)
#define DBGFADDRESS_FLAGS_PHYS   4
#define DBGFADDRESS_FLAGS_RING0   5
#define DBGFADDRESS_FLAGS_TYPE_MASK   7
#define DBGFADDRESS_FLAGS_VALID   RT_BIT(3)
#define DBGFADDRESS_IS_FAR16(pAddress)   ( ((pAddress)->fFlags & DBGFADDRESS_FLAGS_TYPE_MASK) == DBGFADDRESS_FLAGS_FAR16 )
#define DBGFADDRESS_IS_FAR32(pAddress)   ( ((pAddress)->fFlags & DBGFADDRESS_FLAGS_TYPE_MASK) == DBGFADDRESS_FLAGS_FAR32 )
#define DBGFADDRESS_IS_FAR64(pAddress)   ( ((pAddress)->fFlags & DBGFADDRESS_FLAGS_TYPE_MASK) == DBGFADDRESS_FLAGS_FAR64 )
#define DBGFADDRESS_IS_FLAT(pAddress)   ( ((pAddress)->fFlags & DBGFADDRESS_FLAGS_TYPE_MASK) == DBGFADDRESS_FLAGS_FLAT )
#define DBGFADDRESS_IS_HMA(pAddress)   ( !!((pAddress)->fFlags & DBGFADDRESS_FLAGS_HMA) )
#define DBGFADDRESS_IS_PHYS(pAddress)   ( ((pAddress)->fFlags & DBGFADDRESS_FLAGS_TYPE_MASK) == DBGFADDRESS_FLAGS_PHYS )
#define DBGFADDRESS_IS_VALID(pAddress)   ( !!((pAddress)->fFlags & DBGFADDRESS_FLAGS_VALID) )
Flags for the info registration functions.
#define DBGFINFO_FLAGS_RUN_ON_EMT   RT_BIT(0)
DBGFR3SelQueryInfo flags.
#define DBGFSELQI_FLAGS_DT_GUEST   UINT32_C(0)
#define DBGFSELQI_FLAGS_DT_SHADOW   UINT32_C(1)
DBGFSTACKFRAME Flags.
#define DBGFSTACKFRAME_FLAGS_ALL_VALID   RT_BIT(0)
#define DBGFSTACKFRAME_FLAGS_LAST   RT_BIT(1)
#define DBGFSTACKFRAME_FLAGS_LOOP   RT_BIT(2)
#define DBGFSTACKFRAME_FLAGS_MAX_DEPTH   RT_BIT(3)

Typedefs

typedef enum DBGFRETRUNTYPE DBGFRETURNTYPE
typedef void PCDBGFBP pBp
typedef const DBGFADDRESSPCDBGFADDRESS
typedef const DBGFBPPCDBGFBP
typedef const DBGFEVENTPCDBGFEVENT
typedef struct DBGFINFOHLPPCDBGFINFOHLP
typedef const DBGFLINEPCDBGFLINE
typedef DBGFOSINTERFACE const * PCDBGFOSINTERFACE
typedef DBGFOSREG const * PCDBGFOSREG
typedef struct DBGFSTACKFRAME
const * 
PCDBGFSTACKFRAME
typedef const DBGFSYMBOLPCDBGFSYMBOL
typedef DBGFADDRESSPDBGFADDRESS
typedef DBGFBPPDBGFBP
typedef DBGFEVENTPDBGFEVENT
typedef struct DBGFINFOHLPPDBGFINFOHLP
typedef DBGFLINEPDBGFLINE
typedef DBGFOSINTERFACEPDBGFOSINTERFACE
typedef DBGFOSREGPDBGFOSREG
typedef struct DBGFSTACKFRAMEPDBGFSTACKFRAME
typedef DBGFSYMBOLPDBGFSYMBOL
typedef FNDBGFBPENUM * PFNDBGFBPENUM
typedef FNDBGFHANDLERDEV * PFNDBGFHANDLERDEV
typedef FNDBGFHANDLERDRV * PFNDBGFHANDLERDRV
typedef FNDBGFHANDLEREXT * PFNDBGFHANDLEREXT
typedef FNDBGFHANDLERINT * PFNDBGFHANDLERINT
typedef FNDBGFINFOENUM * PFNDBGFINFOENUM
typedef PCDBGFINFOHLP pHlp
typedef PCDBGFINFOHLP const char * pszArgs
typedef void * pvUser

Enumerations

enum  DBGFBPTYPE {
  DBGFBPTYPE_FREE = 0, DBGFBPTYPE_REG, DBGFBPTYPE_INT3, DBGFBPTYPE_REM,
  DBGFBPTYPE_32BIT_HACK = 0x7fffffff
}
enum  DBGFEVENTCTX {
  DBGFEVENTCTX_INVALID = 0, DBGFEVENTCTX_RAW, DBGFEVENTCTX_REM, DBGFEVENTCTX_HWACCL,
  DBGFEVENTCTX_HYPER, DBGFEVENTCTX_OTHER, DBGFEVENTCTX_32BIT_HACK = 0x7fffffff
}
enum  DBGFEVENTTYPE {
  DBGFEVENT_HALT_DONE = 0, DBGFEVENT_DETACH_DONE, DBGFEVENT_INVALID_COMMAND, DBGFEVENT_FATAL_ERROR = 100,
  DBGFEVENT_BREAKPOINT, DBGFEVENT_BREAKPOINT_HYPER, DBGFEVENT_ASSERTION_HYPER, DBGFEVENT_STEPPED,
  DBGFEVENT_STEPPED_HYPER, DBGFEVENT_DEV_STOP, DBGFEVENT_TERMINATING, DBGFEVENT_32BIT_HACK = 0x7fffffff
}
enum  DBGFOSINTERFACE {
  DBGFOSINTERFACE_INVALID = 0, DBGFOSINTERFACE_PROCESS, DBGFOSINTERFACE_THREAD, DBGFOSINTERFACE_END,
  DBGFOSINTERFACE_32BIT_HACK = 0x7fffffff
}
enum  DBGFRETRUNTYPE {
  DBGFRETURNTYPE_INVALID = 0, DBGFRETURNTYPE_NEAR16, DBGFRETURNTYPE_NEAR32, DBGFRETURNTYPE_NEAR64,
  DBGFRETURNTYPE_FAR16, DBGFRETURNTYPE_FAR32, DBGFRETURNTYPE_FAR64, DBGFRETURNTYPE_IRET16,
  DBGFRETURNTYPE_IRET32, DBGFRETURNTYPE_IRET32_PRIV, DBGFRETURNTYPE_IRET32_V86, DBGFRETURNTYPE_IRET64,
  DBGFRETURNTYPE_END, DBGFRETURNTYPE_32BIT_HACK = 0x7fffffff
}
DBGFCODETYPE
enum  DBGFCODETYPE {
  DBGFCODETYPE_INVALID = 0, DBGFCODETYPE_GUEST, DBGFCODETYPE_HYPER, DBGFCODETYPE_RING0,
  DBGFCODETYPE_32BIT_HACK = 0x7fffffff
}

Functions

typedef DECLCALLBACK (void) FNDBGFHANDLERDEV(PPDMDEVINS pDevIns
typedef DECLCALLBACK (int) FNDBGFBPENUM(PVM pVM
 DECLINLINE (unsigned) DBGFReturnTypeSize(DBGFRETURNTYPE enmRetType)
 VMMDECL (bool) DBGFIsStepping(PVMCPU pVCpu)
 VMMDECL (RTGCUINTREG) DBGFBpGetDR7(PVM pVM)
 VMMR3DECL (void *) DBGFR3OSQueryInterface(PVM pVM
 VMMR3DECL (PCDBGFSTACKFRAME) DBGFR3StackWalkNext(PCDBGFSTACKFRAME pCurrent)
 VMMR3DECL (PDBGFLINE) DBGFR3LineByAddrAlloc(PVM pVM
 VMMR3DECL (PDBGFSYMBOL) DBGFR3SymbolByAddrAlloc(PVM pVM
 VMMR3DECL (RTDBGAS) DBGFR3AsResolve(PVM pVM
 VMMR3DECL (PCDBGFINFOHLP) DBGFR3InfoLogHlp(void)
 VMMR3DECL (void) DBGFR3Relocate(PVM pVM
 VMMR3DECL (bool) DBGFR3AddrIsValid(PVM pVM
 VMMR3DECL (PDBGFADDRESS) DBGFR3AddrFromFlat(PVM pVM
 VMMR3DECL (int) DBGFR3AddrFromSelOff(PVM pVM

Variables

RTGCUINTPTR Address
const char RTGCUINTPTR AddressDelta
DBGFEVENTTYPE const char
unsigned const char const char
DBGFEVENTTYPE const char
unsigned const char const char
va_list 
args
PCDBGFADDRESS uint64_t
uint64_t uint8_t uint8_t 
cb
VMCPUID PCDBGFADDRESS char size_t cbBuf
const char RTGCUINTPTR const
char RTGCUINTPTR unsigned 
cbImage
VMCPUID PCDBGFADDRESS
RTGCUINTPTR const uint8_t
size_t 
cbNeedle
char uint32_t cbOutput
VMCPUID PCDBGFADDRESS RTGCUINTPTR cbRange
VMCPUID PCDBGFADDRESS void size_t cbRead
RTGCUINTPTR RTGCUINTPTR RTUINT cbSymbol
char size_t cchName
VMCPUID RTSEL RTGCPTR unsigned
char uint32_t 
cchOutput
char size_t char size_t cchVersion
unsigned cMillies
VMCPUID DBGFCODETYPE enmCodeType
DBGFEVENTTYPE enmEvent
DBGFOSINTERFACE enmIf
VMCPUID DBGFCODETYPE
PCDBGFADDRESS PCDBGFADDRESS
PCDBGFADDRESS DBGFRETURNTYPE 
enmReturnType
const char const char
PFNDBGFHANDLERINT uint32_t 
fFlags
PDBGFADDRESS RTGCUINTPTR FlatPtr
VMCPUID PDBGFADDRESS bool fReadOnly
PCDBGFADDRESS uint64_t
uint64_t uint8_t 
fType
VMCPUID RTSEL RTGCPTR GCPtr
RTDBGAS hAlias
RTDBGAS RTDBGAS hAliasFor
RTDBGAS hDbgAs
RTDBGAS RTDBGMOD hMod
RTUINT iBp
PCDBGFADDRESS uint64_t uint64_t iHitDisable
PCDBGFADDRESS uint64_t iHitTrigger
RTDBGAS const char const char
PCDBGFADDRESS RTDBGSEGIDX 
iModSeg
const char RTGCUINTPTR const
char RTGCUINTPTR 
ModuleAddress
RTGCUINTPTR RTGCUINTPTR NewImageBase
VMCPUID PDBGFADDRESS RTSEL
RTUINTPTR 
off
RTGCINTPTR offDelta
RTGCUINTPTR OldImageBase
VMCPUID PCDBGFADDRESS
RTGCUINTPTR const uint8_t * 
pabNeedle
VMCPUID PDBGFADDRESS pAddress
VMCPUID DBGFCODETYPE PCDBGFADDRESS pAddrFrame
VMCPUID DBGFCODETYPE
PCDBGFADDRESS PCDBGFADDRESS
PCDBGFADDRESS 
pAddrPC
VMCPUID DBGFCODETYPE
PCDBGFADDRESS PCDBGFADDRESS 
pAddrStack
VMCPUID RTSEL RTGCPTR unsigned
char uint32_t uint32_t * 
pcbInstr
const char const char
PFNDBGFHANDLERDEV PPDMDEVINS 
pDevIns
const char const char
PFNDBGFHANDLERDRV PPDMDRVINS 
pDrvIns
PFNDBGFBPENUM pfnCallback
const char const char
PFNDBGFHANDLERDEV 
pfnHandler
VMCPUID PDBGFADDRESS PRTGCPHYS pGCPhys
VMCPUID PDBGFADDRESS PRTHCPHYS pHCPhys
VMCPUID PCDBGFADDRESS
RTGCUINTPTR const uint8_t
size_t PDBGFADDRESS 
pHitAddress
PDBGFADDRESS RTGCPHYS PhysAddr
PCDBGFADDRESS uint64_t
uint64_t PRTUINT 
piBp
RTGCUINTPTR PRTGCINTPTR PDBGFLINE pLine
RTDBGAS const char const char
PCDBGFADDRESS 
pModAddress
RTGCUINTPTR PRTGCINTPTR poffDisplacement
unsigned PCDBGFEVENTppEvent
VMCPUID DBGFCODETYPE
PCDBGFSTACKFRAME
ppFirstFrame
VMCPUID PDBGFADDRESS bool void ** ppvR3Ptr
PCDBGFOSREG pReg
RTDBGAS RTPROCESS ProcId
VMCPUID RTSEL uint32_t PDBGFSELINFO pSelInfo
RTGCUINTPTR PRTGCINTPTR PDBGFSYMBOL pSymbol
VMCPUID PCDBGFADDRESS char * pszBuf
const char const char * pszDesc
const char * pszDestSettings
DBGFEVENTTYPE const char * pszFile
RTDBGAS const char * pszFilename
const char * pszFlagSettings
DBGFEVENTTYPE const char
unsigned const char const char * 
pszFormat
DBGFEVENTTYPE const char
unsigned const char * 
pszFunction
const char * pszGroupSettings
RTDBGAS const char const char * pszModName
DBGFEVENTTYPE const char * pszMsg1
DBGFEVENTTYPE const char const
char * 
pszMsg2
const char * pszName
VMCPUID RTSEL RTGCPTR unsigned
char * 
pszOutput
const char * pszPrefix
RTGCUINTPTR RTGCUINTPTR RTUINT
const char * 
pszSymbol
char size_t char * pszVersion
VMCPUID PCDBGFADDRESS void * pvBuf
VMCPUID PDBGFADDRESS RTSEL Sel
RTGCUINTPTR RTGCUINTPTR SymbolAddress
RTGCUINTPTR uAddend
DBGFEVENTTYPE const char unsigned uLine
RTGCUINTPTR uSubtrahend
APIC RC Helpers
VMCPUID idCpu


Generated by  Doxygen 1.6.0   Back to index