- Timestamp:
- May 13, 2008 11:16:03 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 30797
- Location:
- trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/dbgf.h
r8155 r8797 1550 1550 DBGFR3DECL(int) DBGFR3MemScan(PVM pVM, PCDBGFADDRESS pAddress, RTGCUINTPTR cbRange, const uint8_t *pabNeedle, size_t cbNeedle, PDBGFADDRESS pHitAddress); 1551 1551 1552 1553 /** 1554 * Guest OS digger interface identifier. 1555 * 1556 * This is for use together with PDBGFR3QueryInterface and is used to 1557 * obtain access to optional interfaces. 1558 */ 1559 typedef enum DBGFOSINTERFACE 1560 { 1561 /** The usual invalid entry. */ 1562 DBGFOSINTERFACE_INVALID = 0, 1563 /** Process info. */ 1564 DBGFOSINTERFACE_PROCESS, 1565 /** Thread info. */ 1566 DBGFOSINTERFACE_THREAD, 1567 /** The end of the valid entries. */ 1568 DBGFOSINTERFACE_END, 1569 /** The usual 32-bit type blowup. */ 1570 DBGFOSINTERFACE_32BIT_HACK = 0x7fffffff 1571 } DBGFOSINTERFACE; 1572 /** Pointer to a Guest OS digger interface identifier. */ 1573 typedef DBGFOSINTERFACE *PDBGFOSINTERFACE; 1574 /** Pointer to a const Guest OS digger interface identifier. */ 1575 typedef DBGFOSINTERFACE const *PCDBGFOSINTERFACE; 1576 1577 1578 /** 1579 * Guest OS Digger Registration Record. 1580 * 1581 * This is used with the DBGFR3OSRegister() API. 1582 */ 1583 typedef struct DBGFOSREG 1584 { 1585 /** Magic value (DBGFOSREG_MAGIC). */ 1586 uint32_t u32Magic; 1587 /** Flags. Reserved. */ 1588 uint32_t fFlags; 1589 /** The size of the instance data. */ 1590 uint32_t cbData; 1591 /** Operative System name. */ 1592 char szName[24]; 1593 1594 /** 1595 * Constructs the instance. 1596 * 1597 * @returns VBox status code. 1598 * @param pVM Pointer to the shared VM structure. 1599 * @param pvData Pointer to the instance data. 1600 */ 1601 DECLCALLBACKMEMBER(int, pfnConstruct)(PVM pVM, void *pvData); 1602 1603 /** 1604 * Destroys the instance. 1605 * 1606 * @param pVM Pointer to the shared VM structure. 1607 * @param pvData Pointer to the instance data. 1608 */ 1609 DECLCALLBACKMEMBER(void, pfnDestruct)(PVM pVM, void *pvData); 1610 1611 /** 1612 * Probes the guest memory for OS finger prints. 1613 * 1614 * No setup or so is performed, it will be followed by a call to pfnInit 1615 * or pfnRefresh that should take care of that. 1616 * 1617 * @returns true if is an OS handled by this module, otherwise false. 1618 * @param pVM Pointer to the shared VM structure. 1619 * @param pvData Pointer to the instance data. 1620 */ 1621 DECLCALLBACKMEMBER(bool, pfnProbe)(PVM pVM, void *pvData); 1622 1623 /** 1624 * Initializes a fresly detected guest, loading symbols and such useful stuff. 1625 * 1626 * This is called after pfnProbe. 1627 * 1628 * @returns VBox status code. 1629 * @param pVM Pointer to the shared VM structure. 1630 * @param pvData Pointer to the instance data. 1631 */ 1632 DECLCALLBACKMEMBER(int, pfnInit)(PVM pVM, void *pvData); 1633 1634 /** 1635 * Refreshes symbols and stuff following a redetection of the same OS. 1636 * 1637 * This is called after pfnProbe. 1638 * 1639 * @returns VBox status code. 1640 * @param pVM Pointer to the shared VM structure. 1641 * @param pvData Pointer to the instance data. 1642 */ 1643 DECLCALLBACKMEMBER(int, pfnRefresh)(PVM pVM, void *pvData); 1644 1645 /** 1646 * Terminates an OS when a new (or none) OS has been detected, 1647 * and before destruction. 1648 * 1649 * This is called after pfnProbe and if needed before pfnDestruct. 1650 * 1651 * @param pVM Pointer to the shared VM structure. 1652 * @param pvData Pointer to the instance data. 1653 */ 1654 DECLCALLBACKMEMBER(void, pfnTerm)(PVM pVM, void *pvData); 1655 1656 /** 1657 * Queries the version of the running OS. 1658 * 1659 * This is only called after pfnInit(). 1660 * 1661 * @returns VBox status code. 1662 * @param pVM Pointer to the shared VM structure. 1663 * @param pvData Pointer to the instance data. 1664 * @param pszVersion Where to store the version string. 1665 * @param cchVersion The size of the version string buffer. 1666 */ 1667 DECLCALLBACKMEMBER(int, pfnQueryVersion)(PVM pVM, void *pvData, char *pszVersion, size_t cchVersion); 1668 1669 /** 1670 * Queries the pointer to a interface. 1671 * 1672 * This is called after pfnProbe. 1673 * 1674 * @returns Pointer to the interface if available, NULL if not available. 1675 * @param pVM Pointer to the shared VM structure. 1676 * @param pvData Pointer to the instance data. 1677 * @param enmIf The interface identifier. 1678 */ 1679 DECLCALLBACKMEMBER(void *, pfnQueryInterface)(PVM pVM, void *pvData, DBGFOSINTERFACE enmIf); 1680 1681 /** Trailing magic (DBGFOSREG_MAGIC). */ 1682 uint32_t u32EndMagic; 1683 } DBGFOSREG; 1684 /** Pointer to a Guest OS digger registration record. */ 1685 typedef DBGFOSREG *PDBGFOSREG; 1686 /** Pointer to a const Guest OS digger registration record. */ 1687 typedef DBGFOSREG const *PCDBGFOSREG; 1688 1689 /** Magic value for DBGFOSREG::u32Magic and DBGFOSREG::u32EndMagic. (Hitomi Kanehara) */ 1690 #define DBGFOSREG_MAGIC 0x19830808 1691 1692 DBGFR3DECL(int) DBGFR3OSRegister(PVM pVM, PDBGFOSREG pReg); 1693 DBGFR3DECL(int) DBGFR3OSDeregister(PVM pVM, PDBGFOSREG pReg); 1694 DBGFR3DECL(int) DBGFR3OSDetect(PVM pVM, char *pszName, size_t cchName); 1695 DBGFR3DECL(int) DBGFR3OSNameAndVersion(PVM pVM, char *pszName, size_t cchName, char *pszVersion, size_t cchVersion); 1696 DBGFR3DECL(void *) DBGFR3OSQueryInterface(PVM pVM, DBGFOSINTERFACE enmIf); 1697 1552 1698 /** @} */ 1553 1699 1700 1554 1701 __END_DECLS 1555 1702 -
trunk/include/VBox/err.h
r8543 r8797 239 239 /** The byte string was not found. */ 240 240 #define VERR_DBGF_MEM_NOT_FOUND (-1208) 241 /** The OS was not detected. */ 242 #define VERR_DBGF_OS_NOT_DETCTED (-1209) 243 /** The OS was not detected. */ 244 #define VINF_DBGF_OS_NOT_DETCTED 1209 241 245 /** @} */ 242 246 -
trunk/include/VBox/mm.h
r8155 r8797 145 145 MM_TAG_DBGF_LINE, 146 146 MM_TAG_DBGF_LINE_DUP, 147 MM_TAG_DBGF_MODULE, 148 MM_TAG_DBGF_OS, 147 149 MM_TAG_DBGF_STACK, 148 150 MM_TAG_DBGF_SYMBOL, 149 151 MM_TAG_DBGF_SYMBOL_DUP, 150 MM_TAG_DBGF_MODULE,151 152 152 153 MM_TAG_EM, -
trunk/src/VBox/VMM/DBGF.cpp
r8155 r8797 203 203 * Terminate the other bits. 204 204 */ 205 dbgfR3OSTerm(pVM); 205 206 dbgfR3InfoTerm(pVM); 206 207 return VINF_SUCCESS; -
trunk/src/VBox/VMM/DBGFInternal.h
r8155 r8797 169 169 170 170 /** 171 * Guest OS digger instance. 172 */ 173 typedef struct DBGFOS 174 { 175 /** Pointer to the registration record. */ 176 PCDBGFOSREG pReg; 177 /** Pointer to the next OS we've registered. */ 178 struct DBGFOS *pNext; 179 /** The instance data (variable size). */ 180 uint8_t abData[16]; 181 } DBGFOS; 182 /** Pointer to guest OS digger instance. */ 183 typedef DBGFOS *PDBGFOS; 184 /** Pointer to const guest OS digger instance. */ 185 typedef DBGFOS const *PCDBGFOS; 186 187 188 /** 171 189 * Converts a DBGF pointer into a VM pointer. 172 190 * @returns Pointer to the VM structure the CPUM is part of. … … 253 271 * This is checked and cleared in the \#DB handler. */ 254 272 bool fSingleSteppingRaw; 273 274 /** The current Guest OS digger. */ 275 PDBGFOS pCurOS; 276 /** The head of the Guest OS digger instances. */ 277 PDBGFOS pOSHead; 255 278 } DBGF; 256 279 /** Pointer to DBGF Data. */ … … 260 283 extern int dbgfR3InfoInit(PVM pVM); 261 284 extern int dbgfR3InfoTerm(PVM pVM); 285 extern void dbgfR3OSTerm(PVM pVM); 262 286 extern int dbgfR3SymInit(PVM pVM); 263 287 extern int dbgfR3SymTerm(PVM pVM); -
trunk/src/VBox/VMM/MMHeap.cpp
r8155 r8797 656 656 TAG2STR(DBGF_LINE); 657 657 TAG2STR(DBGF_LINE_DUP); 658 TAG2STR(DBGF_MODULE); 659 TAG2STR(DBGF_OS); 658 660 TAG2STR(DBGF_STACK); 659 661 TAG2STR(DBGF_SYMBOL); 660 662 TAG2STR(DBGF_SYMBOL_DUP); 661 TAG2STR(DBGF_MODULE);662 663 663 664 TAG2STR(EM); -
trunk/src/VBox/VMM/Makefile.kmk
r8760 r8797 65 65 DBGFLog.cpp \ 66 66 DBGFMem.cpp \ 67 DBGFOS.cpp \ 67 68 DBGFStack.cpp \ 68 69 DBGFSym.cpp \
Note:
See TracChangeset
for help on using the changeset viewer.