Changeset 40826 in vbox
- Timestamp:
- Apr 8, 2012 6:41:46 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
include/VBox/VBoxTpG.h (modified) (2 diffs)
-
include/iprt/asmdefs.mac (modified) (1 diff)
-
include/iprt/path.h (modified) (2 diffs)
-
src/bldprogs/VBoxTpG.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/VBoxTpG.h
r40603 r40826 37 37 const char *pszFile; 38 38 uint8_t *pbProbe; 39 #if ARCH_BITS == 32 /* Make the structure a multiple of 8. */ 40 uint32_t u32Padding; 41 #endif 39 42 } VTGPROBELOC; 40 43 /** Pointer to a probe location. */ … … 51 54 * indicated by VTG_LOC_SECT. */ 52 55 #if defined(RT_OS_WINDOWS) 53 # define VTG_OBJ_SECT " .VTGObj"54 # define VTG_LOC_SECT " .VTGPrLc"56 # define VTG_OBJ_SECT "VTGObj" 57 # define VTG_LOC_SECT "VTGPrLc.Data" 55 58 # ifdef _MSC_VER 56 59 # define VTG_DECL_VTGPROBELOC(a_VarName) \ -
trunk/include/iprt/asmdefs.mac
r30943 r40826 122 122 %ifdef ASM_FORMAT_PE 123 123 %ifdef RT_ARCH_AMD64 124 %define IMP(name) qword [IMPNAME(name) wrt rip] 125 %else 126 %define IMP(name) dword [IMPNAME(name)] 127 %endif 128 %else 129 %define IMP(name) IMPNAME(name) 124 %define IMP(name) qword [IMPNAME(name) wrt rip] 125 %else 126 %define IMP(name) dword [IMPNAME(name)] 127 %endif 128 %else 129 %define IMP(name) IMPNAME(name) 130 %endif 131 132 ;; 133 ; Gets the pointer to an imported object, version 2. 134 %ifdef ASM_FORMAT_PE 135 %ifdef RT_ARCH_AMD64 136 %define IMP2(name) qword [IMPNAME(name) wrt rip] 137 %else 138 %define IMP2(name) dword [IMPNAME(name)] 139 %endif 140 %else 141 %ifdef RT_ARCH_AMD64 142 %define IMP2(name) IMPNAME(name) wrt rip 143 %else 144 %define IMP2(name) IMPNAME(name) 145 %endif 130 146 %endif 131 147 -
trunk/include/iprt/path.h
r39641 r40826 558 558 * Callback for RTPathTraverseList that's called for each element. 559 559 * 560 * @returns IPRT style status code. Return V INF_TRY_AGAIN to continue, any other560 * @returns IPRT style status code. Return VERR_TRY_AGAIN to continue, any other 561 561 * value will abort the traversing and be returned to the caller. 562 562 * … … 576 576 * 577 577 * @returns IPRT style status code from the callback or VERR_END_OF_STRING if 578 * the callback returned V INF_TRY_AGAIN for all paths in the string.578 * the callback returned VERR_TRY_AGAIN for all paths in the string. 579 579 * 580 580 * @param pszPathList The string to traverse. -
trunk/src/bldprogs/VBoxTpG.cpp
r40763 r40826 272 272 int rc = RTProcCreate(apszArgs[0], apszArgs, RTENV_DEFAULT, RTPROC_FLAGS_SEARCH_PATH, &hProc); 273 273 if (RT_FAILURE(rc)) 274 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to start '%s' (ass mebler): %Rrc", apszArgs[0], rc);274 return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to start '%s' (assembler): %Rrc", apszArgs[0], rc); 275 275 276 276 RTPROCSTATUS Status; … … 394 394 395 395 pVtgStr->offStrTab = g_offStrTab; 396 g_offStrTab += pVtgStr->Core.cchString + 1;396 g_offStrTab += (uint32_t)pVtgStr->Core.cchString + 1; 397 397 398 398 ScmStreamPrintf(pStrm, … … 460 460 " NAME(%%1):\n" 461 461 " %%endmacro\n" 462 " [section VTGObj align=4096]\n" 462 " [section VTGPrLc.Begin data align=64]\n" 463 /*" times 24 db 0xcc\n"*/ 464 "VTG_GLOBAL g_aVTGPrLc, data\n" 465 " [section VTGPrLc.Data data align=4]\n" 466 " [section VTGPrLc.End data align=4]\n" 467 "VTG_GLOBAL g_aVTGPrLc_End, data\n" 468 /*" times 24 db 0xcc\n"*/ 469 " [section VTGObj data align=32]\n" 463 470 "\n" 464 471 "%%elifdef ASM_FORMAT_ELF\n" … … 751 758 ScmStreamPrintf(pStrm, g_fProbeFnImported ? 752 759 " mov edx, [eax + 4] ; idProbe\n" 753 " mov ecx, IMP (%s)\n"760 " mov ecx, IMP2(%s)\n" 754 761 " mov [esp + 4], edx ; Replace pVTGProbeLoc with idProbe.\n" 755 762 " jmp ecx\n" … … 761 768 else if (fWin64) 762 769 ScmStreamPrintf(pStrm, g_fProbeFnImported ? 763 " mov rax, IMP (%s) wrt RIP\n"770 " mov rax, IMP2(%s)\n" 764 771 " mov ecx, [rcx + 4] ; idProbe replaces pVTGProbeLoc.\n" 765 772 " jmp rax\n" … … 770 777 else 771 778 ScmStreamPrintf(pStrm, g_fProbeFnImported ? 772 " lea rax, [IMP (%s) wrt RIP]\n" //??? macho64?779 " lea rax, [IMP2(%s)]\n" //??? macho64? 773 780 " mov edi, [rdi + 4] ; idProbe replaces pVTGProbeLoc.\n" 774 781 " jmp rax\n" … … 870 877 "\n" 871 878 "#ifdef VBOX_WITH_DTRACE\n" 879 "\n" 880 "# ifdef _MSC_VER\n" 881 "# pragma data_seg(VTG_LOC_SECT)\n" 882 "# pragma data_seg()\n" 883 "# endif\n" 872 884 "\n" 873 885 , … … 1052 1064 1053 1065 /* Is it a leading C character. */ 1054 if (!RT_C_IS_ALPHA(*psz) && !*psz == '_')1066 if (!RT_C_IS_ALPHA(*psz) && *psz == '_') 1055 1067 return NULL; 1056 1068 … … 1091 1103 1092 1104 /* Is it a leading C character. */ 1093 if (!RT_C_IS_ALPHA(*psz) && !*psz == '_')1105 if (!RT_C_IS_ALPHA(*psz) && *psz == '_') 1094 1106 return NULL; 1095 1107 … … 1120 1132 { 1121 1133 if (cb) 1122 ScmStreamSeekRelative(pStrm, - cb);1134 ScmStreamSeekRelative(pStrm, -(ssize_t)cb); 1123 1135 size_t const off = ScmStreamTell(pStrm); 1124 1136 size_t const iLine = ScmStreamTellLine(pStrm); … … 1791 1803 ch = parseGetNextNonSpaceNonCommentChOnPpLine(&Strm); 1792 1804 if (ch == ~(unsigned)0) 1793 rcExit != RTEXITCODE_FAILURE;1805 rcExit = RTEXITCODE_FAILURE; 1794 1806 else if (ch == 'p' && ScmStreamCMatchingWordM1(&Strm, RT_STR_TUPLE("pragma"))) 1795 1807 rcExit = parsePragma(&Strm);
Note:
See TracChangeset
for help on using the changeset viewer.

