Changeset 41338 in vbox
- Timestamp:
- May 16, 2012 2:39:21 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
-
Config.kmk (modified) (4 diffs)
-
include/VBox/VBoxTpG.h (modified) (3 diffs)
-
src/VBox/HostDrivers/Support/SUPDrvTracer.cpp (modified) (3 diffs)
-
src/VBox/VMM/VBoxVMM.d (modified) (1 diff)
-
src/VBox/VMM/VMMRC/VMMRCA.asm (modified) (3 diffs)
-
src/bldprogs/VBoxTpG.cpp (modified) (26 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Config.kmk
r41259 r41338 1534 1534 # 1535 1535 ifeq ($(KBUILD_TARGET_ARCH),amd64) 1536 ARCH_BITS_DEFS := HC_ARCH_BITS=64 1536 VBOX_HC_ARCH_BITS := 64 1537 ARCH_BITS_DEFS := HC_ARCH_BITS=64 1537 1538 else ifeq ($(KBUILD_TARGET_ARCH),x86) 1538 ARCH_BITS_DEFS := HC_ARCH_BITS=32 1539 VBOX_HC_ARCH_BITS := 32 1540 ARCH_BITS_DEFS := HC_ARCH_BITS=32 1539 1541 else 1540 1542 error KBUILD_TARGET_ARCH=$(KBUILD_TARGET_ARCH) … … 2658 2660 TOOL_VBoxTpG = The VirtualBox Tracepoint Generator 2659 2661 TOOL_VBoxTpG_DTRACE_DEPEND = $(VBOX_VBOXTPG) 2660 TOOL_VBoxTpG_DTRACE_HDR_FLAGS := -h #-vvv2662 TOOL_VBoxTpG_DTRACE_HDR_FLAGS := -h --host-$(VBOX_HC_ARCH_BITS)-bit #-vvv 2661 2663 define TOOL_VBoxTpG_DTRACE_HDR_CMDS 2662 2664 $(QUIET)$(VBOX_VBOXTPG) $(flags) -o "$(out)" -s "$(source)" 2663 2665 endef 2664 2666 TOOL_VBoxTpG_DTRACE_OBJ_NOT_NEEDED := 2665 TOOL_VBoxTpG_DTRACE_OBJ_FLAGS := -G #-vvv2667 TOOL_VBoxTpG_DTRACE_OBJ_FLAGS := -G --host-$(VBOX_HC_ARCH_BITS)-bit #-vvv 2666 2668 define TOOL_VBoxTpG_DTRACE_OBJ_CMDS 2667 2669 $(QUIET)$(VBOX_VBOXTPG) \ … … 2700 2702 TEMPLATE_VBoxRc_DTRACETOOL = VBoxTpG 2701 2703 TEMPLATE_VBoxRc_DEFS += VBOX_WITH_DTRACE VBOX_WITH_DTRACE_RC 2702 TEMPLATE_VBoxRc_DTRACE_OBJ_FLAGS = --probe-fn-name "VMMRCProbeFire" 2704 TEMPLATE_VBoxRc_DTRACE_HDR_FLAGS = --raw-mode-context 2705 TEMPLATE_VBoxRc_DTRACE_OBJ_FLAGS = --raw-mode-context --probe-fn-name "VMMRCProbeFire" 2703 2706 else 2704 2707 TEMPLATE_VBoxRc_DTRACETOOL = VBoxTpG-Disabled … … 3221 3224 else 3222 3225 TEMPLATE_VBOXR3EXE_DTRACETOOL = VBoxTpG 3223 TEMPLATE_VBOXR3EXE_DTRACE_OBJ_FLAGS = --pic --probe-fn-imported --probe-fn-name "SUPTracerFireProbe" 3226 TEMPLATE_VBOXR3EXE_DTRACE_HDR_FLAGS = --ring-3-context 3227 TEMPLATE_VBOXR3EXE_DTRACE_OBJ_FLAGS = --ring-3-context --pic --probe-fn-imported --probe-fn-name "SUPTracerFireProbe" 3224 3228 TEMPLATE_VBOXR3EXE_DEFS += VBOX_WITH_DTRACE VBOX_WITH_DTRACE_R3 3225 3229 endif -
trunk/include/VBox/VBoxTpG.h
r41311 r41338 164 164 /** The type context mask. */ 165 165 #define VTG_TYPE_CTX_MASK UINT32_C(0x0f000000) 166 /** The type is automatically converted to a ring-0 pointer. */ 167 #define VTG_TYPE_AUTO_CONV_PTR RT_BIT_32(28) 166 168 /** The type is a physical address. */ 167 169 #define VTG_TYPE_PHYS RT_BIT_32(29) … … 171 173 #define VTG_TYPE_SIGNED RT_BIT_32(31) 172 174 /** Mask of valid bits (for simple validation). */ 173 #define VTG_TYPE_VALID_MASK UINT32_C(0x ef000fff)175 #define VTG_TYPE_VALID_MASK UINT32_C(0xff000fff) 174 176 /** @} */ 175 177 … … 403 405 extern VTGOBJHDR g_VTGObjHeader; 404 406 407 408 /** @name Macros for converting typical pointer arguments to ring-0 pointers. 409 * @{ */ 410 #ifdef IN_RING0 411 # define VTG_VM_TO_R0(a_pVM) (a_pVM) 412 # define VTG_VMCPU_TO_R0(a_pVCpu) (a_pVCpu) 413 # define VTG_CPUMCTX_TO_R0(a_pVCpu, a_pCtx) (a_pCtx) 414 #else 415 # define VTG_VM_TO_R0(a_pVM) ((a_pVM)->pVMR0) 416 # define VTG_VMCPU_TO_R0(a_pVCpu) VM_R0_ADDR((a_pVCpu)->CTX_SUFF(pVM), a_pVCpu) 417 # define VTG_CPUMCTX_TO_R0(a_pVCpu, a_pCtx) VM_R0_ADDR((a_pVCpu)->CTX_SUFF(pVM), a_pCtx) 418 #endif 419 /** @} */ 420 421 405 422 RT_C_DECLS_END 406 423 -
trunk/src/VBox/HostDrivers/Support/SUPDrvTracer.cpp
r41311 r41338 554 554 if (pProbe->offObjHdr != (intptr_t)pVtgHdr - (intptr_t)pProbe) 555 555 { 556 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_ TRACER_BAD_ARG_FLAGS- iProbe=%u offObjHdr=%d expected %zd\n",556 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_VTG_BAD_PROBE - iProbe=%u offObjHdr=%d expected %zd\n", 557 557 i, pProbe->offObjHdr, (intptr_t)pVtgHdr - (intptr_t)pProbe); 558 558 return VERR_SUPDRV_VTG_BAD_PROBE; … … 562 562 if (pArgList->cArgs > 16) 563 563 { 564 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_ TRACER_BAD_ARG_FLAGS- iProbe=%u cArgs=%u\n", i, pArgList->cArgs);564 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_VTG_BAD_ARGLIST - iProbe=%u cArgs=%u\n", i, pArgList->cArgs); 565 565 return VERR_SUPDRV_VTG_BAD_ARGLIST; 566 566 } 567 567 if (pArgList->fHaveLargeArgs >= 2) 568 568 { 569 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_ TRACER_BAD_ARG_FLAGS- iProbe=%u fHaveLargeArgs=%d\n", i, pArgList->fHaveLargeArgs);569 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_VTG_BAD_ARGLIST - iProbe=%u fHaveLargeArgs=%d\n", i, pArgList->fHaveLargeArgs); 570 570 return VERR_SUPDRV_VTG_BAD_ARGLIST; 571 571 } … … 573 573 || pArgList->abReserved[1]) 574 574 { 575 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_ TRACER_BAD_ARG_FLAGS- reserved MBZ iProbe=%u\n", i);575 SUPR0Printf("supdrvVtgValidate: VERR_SUPDRV_VTG_BAD_ARGLIST - reserved MBZ iProbe=%u\n", i); 576 576 return VERR_SUPDRV_VTG_BAD_ARGLIST; 577 577 } -
trunk/src/VBox/VMM/VBoxVMM.d
r40921 r41338 52 52 53 53 probe r0__gvmm__vm__created(void *a_pGVM, void *a_pVM, uint32_t a_Pid, void *a_hEMT0, uint32_t a_cCpus); 54 probe r0__hmsvm__vmexit(struct VMCPU *a_pV M, struct CPUMCTX *a_pCtx, uint64_t a_ExitCode,54 probe r0__hmsvm__vmexit(struct VMCPU *a_pVCpu, struct CPUMCTX *a_pCtx, uint64_t a_ExitCode, 55 55 uint64_t a_ExitInfo1, uint64_t a_ExitInfo2, uint64_t a_ExitIntInfo, 56 56 uint64_t a_TestArgument); 57 probe r0__hmvmx__vmexit(struct VMCPU *a_pV M, struct CPUMCTX *a_pCtx, uint64_t a_ExitReason);57 probe r0__hmvmx__vmexit(struct VMCPU *a_pVCpu, struct CPUMCTX *a_pCtx, uint64_t a_ExitReason); 58 58 59 59 }; -
trunk/src/VBox/VMM/VMMRC/VMMRCA.asm
r41150 r41338 223 223 224 224 ;; 225 ; The raw-mode context equivalent of SUPTracerFireProbe. 225 ; The raw-mode context equivalent of SUPTracerFireProbe. 226 226 ; 227 227 ; See also SUPLibTracerA.asm. … … 238 238 239 239 ; 240 ; Get the address of the tracer context record after first checking 240 ; Get the address of the tracer context record after first checking 241 241 ; that host calls hasn't been disabled. 242 242 ; … … 275 275 ; Copy the arguments off the stack. 276 276 %macro COPY_ONE_ARG 1 277 mov eax, [ebp + 8+ %1 * 4]277 mov eax, [ebp + 12 + %1 * 4] 278 278 mov [edx + SUPDRVTRACERUSRCTX32.u.X86.aArgs + %1*4], eax 279 279 %endmacro -
trunk/src/bldprogs/VBoxTpG.cpp
r41311 r41338 58 58 { 59 59 RTLISTNODE ListEntry; 60 /** The argument name. (heap) */ 60 61 char *pszName; 61 const char *pszType; 62 /** The type presented to the tracer (in string table). */ 63 const char *pszTracerType; 64 /** The argument type used in the probe method in that context. (heap) */ 65 char *pszCtxType; 66 /** Argument passing format string. First and only argument is the name. 67 * (const string) */ 68 const char *pszArgPassingFmt; 69 /** The type flags. */ 62 70 uint32_t fType; 63 71 } VTGARG; … … 119 127 /** List of providers created by the parser. */ 120 128 static RTLISTANCHOR g_ProviderHead; 121 122 129 /** The number of type errors. */ 123 static uint32_t g_cTypeErrors = 0; 130 static uint32_t g_cTypeErrors = 0; 131 124 132 125 133 /** @name Options … … 131 139 kVBoxTpGAction_GenerateObject 132 140 } g_enmAction = kVBoxTpGAction_Nothing; 133 static uint32_t g_cBits = ARCH_BITS; 141 static uint32_t g_cBits = HC_ARCH_BITS; 142 static uint32_t g_cHostBits = HC_ARCH_BITS; 143 static uint32_t g_fTypeContext = VTG_TYPE_CTX_R0; 134 144 static bool g_fApplyCpp = false; 135 145 static uint32_t g_cVerbosity = 0; … … 174 184 # endif 175 185 #endif 176 static const char *g_pszAssemblerFmtVal = RT_CONCAT(g_szAssemblerFmtVal, ARCH_BITS);186 static const char *g_pszAssemblerFmtVal = RT_CONCAT(g_szAssemblerFmtVal, HC_ARCH_BITS); 177 187 static const char *g_pszAssemblerDefOpt = "-D"; 178 188 static const char *g_pszAssemblerIncOpt = "-I"; … … 274 284 apszArgs[iArg++] = "ARCH_BITS=64"; 275 285 apszArgs[iArg++] = g_pszAssemblerDefOpt; 286 if (g_cHostBits == 32) 287 apszArgs[iArg++] = "HC_ARCH_BITS=32"; 288 else 289 apszArgs[iArg++] = "HC_ARCH_BITS=64"; 290 apszArgs[iArg++] = g_pszAssemblerDefOpt; 276 291 if (g_cBits == 32) 277 292 apszArgs[iArg++] = "RT_ARCH_X86"; 278 293 else 279 294 apszArgs[iArg++] = "RT_ARCH_AMD64"; 295 apszArgs[iArg++] = g_pszAssemblerDefOpt; 296 if (g_fTypeContext == VTG_TYPE_CTX_R0) 297 apszArgs[iArg++] = "IN_RING0"; 298 else if (g_fTypeContext == VTG_TYPE_CTX_R3) 299 apszArgs[iArg++] = "IN_RING3"; 300 else if (g_fTypeContext == VTG_TYPE_CTX_RC) 301 apszArgs[iArg++] = "IN_RC"; 302 else 303 apszArgs[iArg++] = "IN_UNKNOWN"; 280 304 if (g_szAssemblerOsDef[0]) 281 305 { … … 442 466 " ; With the ld64-97.17 linker there was a problem with it determin the section\n" 443 467 " ; order based on symbol references. The references to the start and end of the\n" 444 " ; __VTGPrLc section forced it in front of __VTGObj. \n"468 " ; __VTGPrLc section forced it in front of __VTGObj.\n" 445 469 " extern section$start$__VTG$__VTGObj\n" 446 470 " extern section$end$__VTG$__VTGObj\n" … … 474 498 "VTG_GLOBAL g_aVTGPrLc_End, data\n" 475 499 " dd 0,0,0,0, 0,0,0,0\n" 476 " [section .VTGData progbits alloc noexec write align=4096]\n"500 " [section .VTGData]\n" 477 501 "\n" 478 502 "%%else\n" … … 585 609 " dd %8u ; type '%s' (name '%s')\n" 586 610 " dd 0%08xh ; type flags\n", 587 strtabGetOff(pArg->pszT ype), pArg->pszType, pArg->pszName,611 strtabGetOff(pArg->pszTracerType), pArg->pszTracerType, pArg->pszName, 588 612 pArg->fType); 589 613 off += 8; … … 607 631 int32_t cArgs = pProbe->cArgs; 608 632 while ( cArgs-- > 0 609 && pArg2->pszT ype == pArg->pszType610 && pArg2->fType == pArg->fType)633 && pArg2->pszTracerType == pArg->pszTracerType 634 && pArg2->fType == pArg->fType) 611 635 { 612 636 pArg = RTListNodeGetNext(&pArg->ListEntry, VTGARG, ListEntry); … … 765 789 RTListForEach(&pProbe->ArgHead, pArg, VTGARG, ListEntry) 766 790 { 767 ScmStreamPrintf(pStrm, ", %s %s", pArg->pszT ype, pArg->pszName);791 ScmStreamPrintf(pStrm, ", %s %s", pArg->pszTracerType, pArg->pszName); 768 792 } 769 793 ScmStreamPrintf(pStrm, … … 878 902 } 879 903 904 /** 905 * Called via generateFile to generate the header file. 906 * 907 * @returns Exit code status. 908 * @param pStrm The output stream. 909 */ 880 910 static RTEXITCODE generateHeaderInner(PSCMSTREAM pStrm) 881 911 { … … 904 934 } 905 935 936 const char *pszCtxDefine = "UNKNOWN_DEFINE"; 937 if (g_fTypeContext == VTG_TYPE_CTX_R0) 938 pszCtxDefine = "IN_RING0"; 939 else if (g_fTypeContext == VTG_TYPE_CTX_R3) 940 pszCtxDefine = "IN_RING3"; 941 else if (g_fTypeContext == VTG_TYPE_CTX_RC) 942 pszCtxDefine = "IN_RC"; 943 else 944 AssertFailed(); 945 906 946 ScmStreamPrintf(pStrm, 907 947 "/* $Id$ */\n" 908 948 "/** @file\n" 909 " * Automatically generated from %s. Do NOT edit!\n"949 " * Automatically generated from %s. Do NOT edit!\n" 910 950 " */\n" 911 951 "\n" … … 914 954 "\n" 915 955 "#include <VBox/VBoxTpG.h>\n" 956 "\n" 957 "#ifndef %s\n" 958 "# error \"Expected '%s' to be defined\"\n" 959 "#endif\n" 916 960 "\n" 917 961 "RT_C_DECLS_BEGIN\n" … … 927 971 g_pszScript, 928 972 szTmp, 929 szTmp); 973 szTmp, 974 pszCtxDefine); 930 975 931 976 /* … … 939 984 RTListForEach(&pProv->ProbeHead, pProbe, VTGPROBE, ListEntry) 940 985 { 986 PVTGARG const pFirstArg = RTListGetFirst(&pProbe->ArgHead, VTGARG, ListEntry); 987 941 988 ScmStreamPrintf(pStrm, 942 989 "extern uint32_t g_cVTGProbeEnabled_%s_%s;\n" … … 948 995 RTListForEach(&pProbe->ArgHead, pArg, VTGARG, ListEntry) 949 996 { 950 ScmStreamPrintf(pStrm, ", %s", pArg->psz Type);997 ScmStreamPrintf(pStrm, ", %s", pArg->pszCtxType); 951 998 } 952 999 generateProbeDefineName(szTmp, sizeof(szTmp), pProv->pszName, pProbe->pszMangledName); … … 979 1026 RTListForEach(&pProbe->ArgHead, pArg, VTGARG, ListEntry) 980 1027 { 981 ScmStreamPrintf(pStrm, ", %s", pArg->pszName);1028 ScmStreamPrintf(pStrm, pArg->pszArgPassingFmt, pArg->pszName); 982 1029 } 983 1030 ScmStreamPrintf(pStrm, … … 988 1035 RTListForEach(&pProbe->ArgHead, pArg, VTGARG, ListEntry) 989 1036 { 990 if ( pArg->fType &VTG_TYPE_FIXED_SIZED)1037 if ((pArg->fType & (VTG_TYPE_FIXED_SIZED | VTG_TYPE_AUTO_CONV_PTR)) == VTG_TYPE_FIXED_SIZED) 991 1038 ScmStreamPrintf(pStrm, 992 1039 " AssertCompile(sizeof(%s) == %u); \\\n" 993 1040 " AssertCompile(sizeof(%s) <= %u); \\\n", 994 pArg->pszT ype, pArg->fType & VTG_TYPE_SIZE_MASK,1041 pArg->pszTracerType, pArg->fType & VTG_TYPE_SIZE_MASK, 995 1042 pArg->pszName, pArg->fType & VTG_TYPE_SIZE_MASK); 996 1043 else if (pArg->fType & (VTG_TYPE_POINTER | VTG_TYPE_HC_ARCH_SIZED)) … … 999 1046 " AssertCompile(sizeof(%s) <= sizeof(uintptr_t)); \\\n", 1000 1047 pArg->pszName, 1001 pArg->pszT ype);1048 pArg->pszTracerType); 1002 1049 iArg++; 1003 1050 } … … 1542 1589 * The special VBox types. 1543 1590 */ 1544 if (MY_STRMATCH("PVM")) return VTG_TYPE_CTX_POINTER; 1545 if (MY_STRMATCH("PVMCPU")) return VTG_TYPE_CTX_POINTER; 1591 if (MY_STRMATCH("PVM")) return VTG_TYPE_POINTER; 1592 if (MY_STRMATCH("PVMCPU")) return VTG_TYPE_POINTER; 1593 if (MY_STRMATCH("PCPUMCTX")) return VTG_TYPE_POINTER; 1546 1594 1547 1595 /* … … 1605 1653 1606 1654 /** 1655 * Initializes the members of an argument. 1656 * 1657 * @returns RTEXITCODE_SUCCESS or RTEXITCODE_FAILURE+msg. 1658 * @param pProbe The probe. 1659 * @param pArg The argument. 1660 * @param pStrm The input stream (for errors). 1661 * @param pchType The type. 1662 * @param cchType The type length. 1663 * @param pchName The name. 1664 * @param cchName The name length. 1665 */ 1666 static RTEXITCODE parseInitArgument(PVTGPROBE pProbe, PVTGARG pArg, PSCMSTREAM pStrm, 1667 char *pchType, size_t cchType, char *pchName, size_t cchName) 1668 { 1669 Assert(!pArg->pszName); Assert(!pArg->pszTracerType); Assert(!pArg->pszCtxType); Assert(!pArg->fType); 1670 1671 pArg->pszArgPassingFmt = ", %s"; 1672 pArg->pszName = RTStrDupN(pchName, cchName); 1673 pArg->pszTracerType = strtabInsertN(pchType, cchType); 1674 if (!pArg->pszTracerType || !pArg->pszName) 1675 return parseError(pStrm, 1, "Out of memory"); 1676 pArg->fType = parseTypeExpression(pArg->pszTracerType); 1677 1678 if ( (pArg->fType & VTG_TYPE_POINTER) 1679 && !(g_fTypeContext & VTG_TYPE_CTX_R0) ) 1680 { 1681 pArg->fType &= ~VTG_TYPE_POINTER; 1682 if ( !strcmp(pArg->pszTracerType, "struct VM *") || !strcmp(pArg->pszTracerType, "PVM") 1683 || !strcmp(pArg->pszTracerType, "struct VMCPU *") || !strcmp(pArg->pszTracerType, "PVMCPU") 1684 || !strcmp(pArg->pszTracerType, "struct CPUMCTX *") || !strcmp(pArg->pszTracerType, "PCPUMCTX") 1685 ) 1686 { 1687 pArg->fType |= VTG_TYPE_CTX_POINTER | VTG_TYPE_CTX_R0 1688 | VTG_TYPE_FIXED_SIZED | (g_cHostBits / 8) 1689 | VTG_TYPE_AUTO_CONV_PTR; 1690 pArg->pszCtxType = RTStrDup("RTR0PTR"); 1691 1692 if (!strcmp(pArg->pszTracerType, "struct VM *") || !strcmp(pArg->pszTracerType, "PVM")) 1693 pArg->pszArgPassingFmt = ", VTG_VM_TO_R0(%s)"; 1694 else if (!strcmp(pArg->pszTracerType, "struct VMCPU *") || !strcmp(pArg->pszTracerType, "PVMCPU")) 1695 pArg->pszArgPassingFmt = ", VTG_VMCPU_TO_R0(%s)"; 1696 else 1697 { 1698 PVTGARG pFirstArg = RTListGetFirst(&pProbe->ArgHead, VTGARG, ListEntry); 1699 if ( !pFirstArg 1700 || pFirstArg == pArg 1701 || strcmp(pFirstArg->pszName, "a_pVCpu") 1702 || ( strcmp(pFirstArg->pszTracerType, "struct VMCPU *") 1703 && strcmp(pFirstArg->pszTracerType, "PVMCPU *")) ) 1704 return parseError(pStrm, 1, "The automatic ring-0 pointer conversion requires 'a_pVCpu' with type 'struct VMCPU *' as the first argument"); 1705 1706 if (!strcmp(pArg->pszTracerType, "struct CPUMCTX *")|| !strcmp(pArg->pszTracerType, "PCPUMCTX")) 1707 pArg->pszArgPassingFmt = ", VTG_CPUMCTX_TO_R0(a_pVCpu, %s)"; 1708 else 1709 pArg->pszArgPassingFmt = ", VBoxTpG-Is-Buggy!!"; 1710 } 1711 } 1712 else 1713 { 1714 pArg->fType |= VTG_TYPE_CTX_POINTER | g_fTypeContext | VTG_TYPE_FIXED_SIZED | (g_cBits / 8); 1715 pArg->pszCtxType = RTStrDupN(pchType, cchType); 1716 } 1717 } 1718 else 1719 pArg->pszCtxType = RTStrDupN(pchType, cchType); 1720 if (!pArg->pszCtxType) 1721 return parseError(pStrm, 1, "Out of memory"); 1722 1723 return RTEXITCODE_SUCCESS; 1724 } 1725 1726 1727 /** 1607 1728 * Unmangles the probe name. 1608 1729 * … … 1693 1814 if (cchArg - cchName - 1 >= 128) 1694 1815 return parseError(pStrm, 1, "Argument type too long"); 1695 pArg->pszType = strtabInsertN(szArg, cchArg - cchName - 1);1696 pArg->pszName = RTStrDupN(&szArg[cchArg - cchName], cchName);1697 if (!pArg->pszType || !pArg->pszName)1698 return parseError(pStrm, 1, "Out of memory");1699 pArg->fType = parseTypeExpression(pArg->pszType);1816 RTEXITCODE rcExit = parseInitArgument(pProbe, pArg, pStrm, 1817 szArg, cchArg - cchName - 1, 1818 &szArg[cchArg - cchName], cchName); 1819 if (rcExit != RTEXITCODE_SUCCESS) 1820 return rcExit; 1700 1821 if (VTG_TYPE_IS_LARGE(pArg->fType)) 1701 1822 pProbe->fHaveLargeArgs = true; 1702 1703 1823 pArg = NULL; 1704 1824 cchName = cchArg = 0; … … 1936 2056 kVBoxTpGOpt_ProbeFnImported, 1937 2057 kVBoxTpGOpt_ProbeFnNotImported, 2058 kVBoxTpGOpt_Host32Bit, 2059 kVBoxTpGOpt_Host64Bit, 2060 kVBoxTpGOpt_RawModeContext, 2061 kVBoxTpGOpt_Ring0Context, 2062 kVBoxTpGOpt_Ring3Context, 1938 2063 kVBoxTpGOpt_End 1939 2064 }; … … 1960 2085 { "--probe-fn-imported", kVBoxTpGOpt_ProbeFnImported, RTGETOPT_REQ_NOTHING }, 1961 2086 { "--probe-fn-not-imported", kVBoxTpGOpt_ProbeFnNotImported, RTGETOPT_REQ_NOTHING }, 2087 { "--host-32-bit", kVBoxTpGOpt_Host32Bit, RTGETOPT_REQ_NOTHING }, 2088 { "--host-64-bit", kVBoxTpGOpt_Host64Bit, RTGETOPT_REQ_NOTHING }, 2089 { "--raw-mode-context", kVBoxTpGOpt_RawModeContext, RTGETOPT_REQ_NOTHING }, 2090 { "--ring-0-context", kVBoxTpGOpt_Ring0Context, RTGETOPT_REQ_NOTHING }, 2091 { "--ring-3-context", kVBoxTpGOpt_Ring3Context, RTGETOPT_REQ_NOTHING }, 1962 2092 /** @todo We're missing a bunch of assembler options! */ 1963 2093 }; … … 1979 2109 */ 1980 2110 case kVBoxTpGOpt_32Bit: 1981 g_c Bits = 32;2111 g_cHostBits = g_cBits = 32; 1982 2112 g_pszAssemblerFmtVal = g_szAssemblerFmtVal32; 1983 2113 break; 1984 2114 1985 2115 case kVBoxTpGOpt_64Bit: 1986 g_c Bits = 64;2116 g_cHostBits = g_cBits = 64; 1987 2117 g_pszAssemblerFmtVal = g_szAssemblerFmtVal64; 1988 2118 break; … … 2098 2228 break; 2099 2229 2230 case kVBoxTpGOpt_Host32Bit: 2231 g_cHostBits = 32; 2232 break; 2233 2234 case kVBoxTpGOpt_Host64Bit: 2235 g_cHostBits = 64; 2236 break; 2237 2238 case kVBoxTpGOpt_RawModeContext: 2239 g_fTypeContext = VTG_TYPE_CTX_RC; 2240 break; 2241 2242 case kVBoxTpGOpt_Ring0Context: 2243 g_fTypeContext = VTG_TYPE_CTX_R0; 2244 break; 2245 2246 case kVBoxTpGOpt_Ring3Context: 2247 g_fTypeContext = VTG_TYPE_CTX_R3; 2248 break; 2249 2250 2100 2251 /* 2101 2252 * Errors and bugs.
Note:
See TracChangeset
for help on using the changeset viewer.

