Changeset 9847 in vbox
- Timestamp:
- Jun 20, 2008 11:21:16 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/cpum.h
r9841 r9847 402 402 * @{ */ 403 403 CPUMDECL(void) CPUMGetGuestGDTR(PVM pVM, PVBOXGDTR pGDTR); 404 CPUMDECL( uint32_t)CPUMGetGuestIDTR(PVM pVM, uint16_t *pcbLimit);404 CPUMDECL(RTGCPTR) CPUMGetGuestIDTR(PVM pVM, uint16_t *pcbLimit); 405 405 CPUMDECL(RTSEL) CPUMGetGuestTR(PVM pVM); 406 406 CPUMDECL(RTSEL) CPUMGetGuestLDTR(PVM pVM); -
trunk/src/VBox/Debugger/DBGCEmulateCodeView.cpp
r9845 r9847 1679 1679 1680 1680 1681 static int dbgcCmdDumpDTWorker64(PDBGCCMDHLP /*pCmdHlp*/, PCX86DESC64 /*pDesc*/, unsigned /*iEntry*/, bool /* fHyper */, bool * /*fDblEntry*/)1681 static int dbgcCmdDumpDTWorker64(PDBGCCMDHLP pCmdHlp, PCX86DESC64 pDesc, unsigned iEntry, bool fHyper, bool *fDblEntry) 1682 1682 { 1683 1683 /* GUEST64 */ 1684 int rc; 1685 1686 const char *pszHyper = fHyper ? " HYPER" : ""; 1687 const char *pszPresent = pDesc->Gen.u1Present ? "P " : "NP"; 1688 if (pDesc->Gen.u1DescType) 1689 { 1690 static const char * const s_apszTypes[] = 1691 { 1692 "DataRO", /* 0 Read-Only */ 1693 "DataRO", /* 1 Read-Only - Accessed */ 1694 "DataRW", /* 2 Read/Write */ 1695 "DataRW", /* 3 Read/Write - Accessed */ 1696 "DownRO", /* 4 Expand-down, Read-Only */ 1697 "DownRO", /* 5 Expand-down, Read-Only - Accessed */ 1698 "DownRW", /* 6 Expand-down, Read/Write */ 1699 "DownRO", /* 7 Expand-down, Read/Write - Accessed */ 1700 "CodeEO", /* 8 Execute-Only */ 1701 "CodeEO", /* 9 Execute-Only - Accessed */ 1702 "CodeER", /* A Execute/Readable */ 1703 "CodeER", /* B Execute/Readable - Accessed */ 1704 "ConfE0", /* C Conforming, Execute-Only */ 1705 "ConfE0", /* D Conforming, Execute-Only - Accessed */ 1706 "ConfER", /* E Conforming, Execute/Readable */ 1707 "ConfER" /* F Conforming, Execute/Readable - Accessed */ 1708 }; 1709 const char *pszAccessed = pDesc->Gen.u4Type & RT_BIT(0) ? "A " : "NA"; 1710 const char *pszGranularity = pDesc->Gen.u1Granularity ? "G" : " "; 1711 const char *pszBig = pDesc->Gen.u1DefBig ? "BIG" : " "; 1712 uint32_t u32Base = pDesc->Gen.u16BaseLow 1713 | ((uint32_t)pDesc->Gen.u8BaseHigh1 << 16) 1714 | ((uint32_t)pDesc->Gen.u8BaseHigh2 << 24); 1715 uint32_t cbLimit = pDesc->Gen.u16LimitLow | (pDesc->Gen.u4LimitHigh << 16); 1716 if (pDesc->Gen.u1Granularity) 1717 cbLimit <<= PAGE_SHIFT; 1718 1719 rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "%04x %s Bas=%08x Lim=%08x DPL=%d %s %s %s %s AVL=%d L=%d%s\n", 1720 iEntry, s_apszTypes[pDesc->Gen.u4Type], u32Base, cbLimit, 1721 pDesc->Gen.u2Dpl, pszPresent, pszAccessed, pszGranularity, pszBig, 1722 pDesc->Gen.u1Available, pDesc->Gen.u1Long, pszHyper); 1723 } 1724 else 1725 { 1726 static const char * const s_apszTypes[] = 1727 { 1728 "Ill-0 ", /* 0 0000 Reserved (Illegal) */ 1729 "Ill-1 ", /* 1 0001 Available 16-bit TSS */ 1730 "LDT ", /* 2 0010 LDT */ 1731 "Ill-3 ", /* 3 0011 Busy 16-bit TSS */ 1732 "Ill-4 ", /* 4 0100 16-bit Call Gate */ 1733 "Ill-5 ", /* 5 0101 Task Gate */ 1734 "Ill-6 ", /* 6 0110 16-bit Interrupt Gate */ 1735 "Ill-7 ", /* 7 0111 16-bit Trap Gate */ 1736 "Ill-8 ", /* 8 1000 Reserved (Illegal) */ 1737 "Tss64A", /* 9 1001 Available 32-bit TSS */ 1738 "Ill-A ", /* A 1010 Reserved (Illegal) */ 1739 "Tss64B", /* B 1011 Busy 32-bit TSS */ 1740 "Call64", /* C 1100 32-bit Call Gate */ 1741 "Ill-D ", /* D 1101 Reserved (Illegal) */ 1742 "Int64 ", /* E 1110 32-bit Interrupt Gate */ 1743 "Trap64" /* F 1111 32-bit Trap Gate */ 1744 }; 1745 switch (pDesc->Gen.u4Type) 1746 { 1747 /* raw */ 1748 case X86_SEL_TYPE_SYS_UNDEFINED: 1749 case X86_SEL_TYPE_SYS_UNDEFINED2: 1750 case X86_SEL_TYPE_SYS_UNDEFINED4: 1751 case X86_SEL_TYPE_SYS_UNDEFINED3: 1752 case X86_SEL_TYPE_SYS_286_TSS_AVAIL: 1753 case X86_SEL_TYPE_SYS_286_TSS_BUSY: 1754 case X86_SEL_TYPE_SYS_286_CALL_GATE: 1755 case X86_SEL_TYPE_SYS_286_INT_GATE: 1756 case X86_SEL_TYPE_SYS_286_TRAP_GATE: 1757 case X86_SEL_TYPE_SYS_TASK_GATE: 1758 rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "%04x %s %.8Rhxs DPL=%d %s%s\n", 1759 iEntry, s_apszTypes[pDesc->Gen.u4Type], pDesc, 1760 pDesc->Gen.u2Dpl, pszPresent, pszHyper); 1761 break; 1762 1763 case X86_SEL_TYPE_SYS_386_TSS_AVAIL: 1764 case X86_SEL_TYPE_SYS_386_TSS_BUSY: 1765 case X86_SEL_TYPE_SYS_LDT: 1766 { 1767 const char *pszBusy = pDesc->Gen.u4Type & RT_BIT(1) ? "B " : "NB"; 1768 const char *pszBig = pDesc->Gen.u1DefBig ? "BIG" : " "; 1769 const char *pszLong = pDesc->Gen.u1Long ? "LONG" : " "; 1770 1771 uint64_t u32Base = pDesc->Gen.u16BaseLow 1772 | ((uint64_t)pDesc->Gen.u8BaseHigh1 << 16) 1773 | ((uint64_t)pDesc->Gen.u8BaseHigh2 << 24) 1774 | ((uint64_t)pDesc->Gen.u32BaseHigh3 << 32); 1775 uint32_t cbLimit = pDesc->Gen.u16LimitLow | (pDesc->Gen.u4LimitHigh << 16); 1776 1777 rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "%04x %s Bas=%016RX64 Lim=%08x DPL=%d %s %s %s %sAVL=%d R=%d%s\n", 1778 iEntry, s_apszTypes[pDesc->Gen.u4Type], u32Base, cbLimit, 1779 pDesc->Gen.u2Dpl, pszPresent, pszBusy, pszLong, pszBig, 1780 pDesc->Gen.u1Available, pDesc->Gen.u1Long | (pDesc->Gen.u1DefBig << 1), 1781 pszHyper); 1782 *fDblEntry = true; 1783 break; 1784 } 1785 1786 case X86_SEL_TYPE_SYS_386_CALL_GATE: 1787 { 1788 unsigned cParams = pDesc->au8[0] & 0x1f; 1789 const char *pszCountOf = pDesc->Gen.u4Type & RT_BIT(3) ? "DC" : "WC"; 1790 RTSEL sel = pDesc->au16[1]; 1791 uint64_t off = pDesc->au16[0] 1792 | ((uint64_t)pDesc->au16[3] << 16) 1793 | ((uint64_t)pDesc->Gen.u32BaseHigh3 << 32); 1794 rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "%04x %s Sel:Off=%04x:%016RX64 DPL=%d %s %s=%d%s\n", 1795 iEntry, s_apszTypes[pDesc->Gen.u4Type], sel, off, 1796 pDesc->Gen.u2Dpl, pszPresent, pszCountOf, cParams, pszHyper); 1797 *fDblEntry = true; 1798 break; 1799 } 1800 1801 case X86_SEL_TYPE_SYS_386_INT_GATE: 1802 case X86_SEL_TYPE_SYS_386_TRAP_GATE: 1803 { 1804 RTSEL sel = pDesc->au16[1]; 1805 uint64_t off = pDesc->au16[0] 1806 | ((uint64_t)pDesc->au16[3] << 16) 1807 | ((uint64_t)pDesc->Gen.u32BaseHigh3 << 32); 1808 rc = pCmdHlp->pfnPrintf(pCmdHlp, NULL, "%04x %s Sel:Off=%04x:%016RX64 DPL=%d %s%s\n", 1809 iEntry, s_apszTypes[pDesc->Gen.u4Type], sel, off, 1810 pDesc->Gen.u2Dpl, pszPresent, pszHyper); 1811 *fDblEntry = true; 1812 break; 1813 } 1814 1815 /* impossible, just it's necessary to keep gcc happy. */ 1816 default: 1817 return VINF_SUCCESS; 1818 } 1819 } 1684 1820 return VINF_SUCCESS; 1685 1821 } … … 1687 1823 1688 1824 /** 1689 * W roker function that displays one descriptor entry (GDT, LDT, IDT).1825 * Worker function that displays one descriptor entry (GDT, LDT, IDT). 1690 1826 * 1691 1827 * @returns pfnPrintf status code. -
trunk/src/VBox/Debugger/testcase/tstDBGCStubs.cpp
r9842 r9847 53 53 } 54 54 55 CPUMDECL( uint32_t) CPUMGetGuestIDTR(PVM pVM, uint16_t *pcbLimit)55 CPUMDECL(RTGCPTR) CPUMGetGuestIDTR(PVM pVM, uint16_t *pcbLimit) 56 56 { 57 57 return 0; -
trunk/src/VBox/VMM/VMMAll/CPUMAllRegs.cpp
r9841 r9847 677 677 } 678 678 679 CPUMDECL( uint32_t) CPUMGetGuestIDTR(PVM pVM, uint16_t *pcbLimit)679 CPUMDECL(RTGCPTR) CPUMGetGuestIDTR(PVM pVM, uint16_t *pcbLimit) 680 680 { 681 681 if (pcbLimit)
Note:
See TracChangeset
for help on using the changeset viewer.