VirtualBox

Changeset 40826 in vbox


Ignore:
Timestamp:
Apr 8, 2012 6:41:46 PM (12 years ago)
Author:
vboxsync
Message:

VBoxTpG.cpp: Microsoft Visual C++ support.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/VBoxTpG.h

    r40603 r40826  
    3737    const char *pszFile;
    3838    uint8_t    *pbProbe;
     39#if ARCH_BITS == 32 /* Make the structure a multiple of 8. */
     40    uint32_t    u32Padding;
     41#endif
    3942} VTGPROBELOC;
    4043/** Pointer to a probe location. */
     
    5154 * indicated by VTG_LOC_SECT.  */
    5255#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"
    5558# ifdef _MSC_VER
    5659#  define VTG_DECL_VTGPROBELOC(a_VarName) \
  • trunk/include/iprt/asmdefs.mac

    r30943 r40826  
    122122%ifdef ASM_FORMAT_PE
    123123 %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
    130146%endif
    131147
  • trunk/include/iprt/path.h

    r39641 r40826  
    558558 * Callback for RTPathTraverseList that's called for each element.
    559559 *
    560  * @returns IPRT style status code. Return VINF_TRY_AGAIN to continue, any other
     560 * @returns IPRT style status code. Return VERR_TRY_AGAIN to continue, any other
    561561 *          value will abort the traversing and be returned to the caller.
    562562 *
     
    576576 *
    577577 * @returns IPRT style status code from the callback or VERR_END_OF_STRING if
    578  *          the callback returned VINF_TRY_AGAIN for all paths in the string.
     578 *          the callback returned VERR_TRY_AGAIN for all paths in the string.
    579579 *
    580580 * @param   pszPathList     The string to traverse.
  • trunk/src/bldprogs/VBoxTpG.cpp

    r40763 r40826  
    272272    int rc = RTProcCreate(apszArgs[0], apszArgs, RTENV_DEFAULT, RTPROC_FLAGS_SEARCH_PATH, &hProc);
    273273    if (RT_FAILURE(rc))
    274         return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to start '%s' (assmebler): %Rrc", apszArgs[0], rc);
     274        return RTMsgErrorExit(RTEXITCODE_FAILURE, "Failed to start '%s' (assembler): %Rrc", apszArgs[0], rc);
    275275
    276276    RTPROCSTATUS Status;
     
    394394
    395395    pVtgStr->offStrTab = g_offStrTab;
    396     g_offStrTab += pVtgStr->Core.cchString + 1;
     396    g_offStrTab += (uint32_t)pVtgStr->Core.cchString + 1;
    397397
    398398    ScmStreamPrintf(pStrm,
     
    460460                    "  NAME(%%1):\n"
    461461                    " %%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"
    463470                    "\n"
    464471                    "%%elifdef ASM_FORMAT_ELF\n"
     
    751758                ScmStreamPrintf(pStrm, g_fProbeFnImported ?
    752759                                "        mov     edx, [eax + 4]     ; idProbe\n"
    753                                 "        mov     ecx, IMP(%s)\n"
     760                                "        mov     ecx, IMP2(%s)\n"
    754761                                "        mov     [esp + 4], edx     ; Replace pVTGProbeLoc with idProbe.\n"
    755762                                "        jmp     ecx\n"
     
    761768            else if (fWin64)
    762769                ScmStreamPrintf(pStrm, g_fProbeFnImported ?
    763                                 "        mov     rax, IMP(%s) wrt RIP\n"
     770                                "        mov     rax, IMP2(%s)\n"
    764771                                "        mov     ecx, [rcx + 4]     ; idProbe replaces pVTGProbeLoc.\n"
    765772                                "        jmp     rax\n"
     
    770777            else
    771778                ScmStreamPrintf(pStrm, g_fProbeFnImported ?
    772                                 "        lea     rax, [IMP(%s) wrt RIP]\n" //??? macho64?
     779                                "        lea     rax, [IMP2(%s)]\n" //??? macho64?
    773780                                "        mov     edi, [rdi + 4]     ; idProbe replaces pVTGProbeLoc.\n"
    774781                                "        jmp     rax\n"
     
    870877                    "\n"
    871878                    "#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"
    872884                    "\n"
    873885                    ,
     
    10521064
    10531065    /* Is it a leading C character. */
    1054     if (!RT_C_IS_ALPHA(*psz) && !*psz == '_')
     1066    if (!RT_C_IS_ALPHA(*psz) && *psz == '_')
    10551067        return NULL;
    10561068
     
    10911103
    10921104    /* Is it a leading C character. */
    1093     if (!RT_C_IS_ALPHA(*psz) && !*psz == '_')
     1105    if (!RT_C_IS_ALPHA(*psz) && *psz == '_')
    10941106        return NULL;
    10951107
     
    11201132{
    11211133    if (cb)
    1122         ScmStreamSeekRelative(pStrm, -cb);
     1134        ScmStreamSeekRelative(pStrm, -(ssize_t)cb);
    11231135    size_t const off     = ScmStreamTell(pStrm);
    11241136    size_t const iLine   = ScmStreamTellLine(pStrm);
     
    17911803                ch = parseGetNextNonSpaceNonCommentChOnPpLine(&Strm);
    17921804                if (ch == ~(unsigned)0)
    1793                     rcExit != RTEXITCODE_FAILURE;
     1805                    rcExit = RTEXITCODE_FAILURE;
    17941806                else if (ch == 'p' && ScmStreamCMatchingWordM1(&Strm, RT_STR_TUPLE("pragma")))
    17951807                    rcExit = parsePragma(&Strm);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette