儲存庫 vbox 的更動 11973
- 時間撮記:
- 2008-9-2 上午11:44:59 (16 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/VMM/PATM/PATMSSM.cpp
r11972 r11973 746 746 unsigned uCPUMOffset = *pFixup - patmInfo.pCPUMCtxGC; 747 747 748 switch(uCPUMOffset) 749 { 750 case RT_OFFSETOF(CPUMCTX_VER1_6, dr0): 748 /* ''case RT_OFFSETOF()'' does not work as gcc refuses to use & as a constant expression. 749 * Defining RT_OFFSETOF as __builtin_offsetof for gcc would make this possible. But this 750 * function is not available in older gcc versions, at least not in gcc-3.3 */ 751 if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr0)) 752 { 751 753 Log(("Changing dr0 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr0))); 752 754 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr0); 753 break; 754 case RT_OFFSETOF(CPUMCTX_VER1_6, dr1): 755 } 756 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr1)) 757 { 755 758 Log(("Changing dr1 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr1))); 756 759 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr1); 757 break; 758 case RT_OFFSETOF(CPUMCTX_VER1_6, dr2): 760 } 761 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr2)) 762 { 759 763 Log(("Changing dr2 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr2))); 760 764 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr2); 761 break; 762 case RT_OFFSETOF(CPUMCTX_VER1_6, dr3): 765 } 766 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr3)) 767 { 763 768 Log(("Changing dr3 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr3))); 764 769 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr3); 765 break; 766 case RT_OFFSETOF(CPUMCTX_VER1_6, dr4): 770 } 771 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr4)) 772 { 767 773 Log(("Changing dr4 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr4))); 768 774 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr4); 769 break; 770 case RT_OFFSETOF(CPUMCTX_VER1_6, dr5): 775 } 776 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr5)) 777 { 771 778 Log(("Changing dr5 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr5))); 772 779 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr5); 773 break; 774 case RT_OFFSETOF(CPUMCTX_VER1_6, dr6): 780 } 781 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr6)) 782 { 775 783 Log(("Changing dr6 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr6))); 776 784 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr6); 777 break; 778 case RT_OFFSETOF(CPUMCTX_VER1_6, dr7): 785 } 786 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, dr7)) 787 { 779 788 Log(("Changing dr7 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, dr7))); 780 789 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, dr7); 781 break; 782 case RT_OFFSETOF(CPUMCTX_VER1_6, cr0): 790 } 791 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, cr0)) 792 { 783 793 Log(("Changing cr0 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, cr0))); 784 794 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, cr0); 785 break; 786 case RT_OFFSETOF(CPUMCTX_VER1_6, cr2): 795 } 796 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, cr2)) 797 { 787 798 Log(("Changing cr2 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, cr2))); 788 799 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, cr2); 789 break; 790 case RT_OFFSETOF(CPUMCTX_VER1_6, cr3): 800 } 801 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, cr3)) 802 { 791 803 Log(("Changing cr3 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, cr3))); 792 804 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, cr3); 793 break; 794 case RT_OFFSETOF(CPUMCTX_VER1_6, cr4): 805 } 806 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, cr4)) 807 { 795 808 Log(("Changing cr4 offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, cr4))); 796 809 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, cr4); 797 break; 798 case RT_OFFSETOF(CPUMCTX_VER1_6, tr): 810 } 811 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, tr)) 812 { 799 813 Log(("Changing tr offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, tr))); 800 814 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, tr); 801 break; 802 case RT_OFFSETOF(CPUMCTX_VER1_6, ldtr): 815 } 816 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, ldtr)) 817 { 803 818 Log(("Changing ldtr offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, ldtr))); 804 819 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, ldtr); 805 break; 806 case RT_OFFSETOF(CPUMCTX_VER1_6, gdtr.pGdt): 820 } 821 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, gdtr.pGdt)) 822 { 807 823 Log(("Changing pGdt offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, gdtr.pGdt))); 808 824 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, gdtr.pGdt); 809 break; 810 case RT_OFFSETOF(CPUMCTX_VER1_6, gdtr.cbGdt): 825 } 826 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, gdtr.cbGdt)) 827 { 811 828 Log(("Changing cbGdt offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, gdtr.cbGdt))); 812 829 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, gdtr.cbGdt); 813 break; 814 case RT_OFFSETOF(CPUMCTX_VER1_6, idtr.pIdt): 830 } 831 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, idtr.pIdt)) 832 { 815 833 Log(("Changing pIdt offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, idtr.pIdt))); 816 834 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, idtr.pIdt); 817 break; 818 case RT_OFFSETOF(CPUMCTX_VER1_6, idtr.cbIdt): 835 } 836 else if (uCPUMOffset == (unsigned)RT_OFFSETOF(CPUMCTX_VER1_6, idtr.cbIdt)) 837 { 819 838 Log(("Changing cbIdt offset from %x to %x\n", uCPUMOffset, RT_OFFSETOF(CPUMCTX, idtr.cbIdt))); 820 839 *pFixup = pVM->patm.s.pCPUMCtxGC + RT_OFFSETOF(CPUMCTX, idtr.cbIdt); 821 break;822 default:840 } 841 else 823 842 AssertFailed(); 824 break;825 }826 843 } 827 844 else
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器