Ignore:
Timestamp:
Aug 20, 2007, 5:25:44 AM (18 years ago)
Author:
bird
Message:

it builds.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kDbg/kDbgModPE-generic.cpp

    r3528 r3529  
    6363 * @param   puRVA       Where to store the RVA on success.
    6464 */
    65 static int rtDbgModPeSegOffToRVA(PKDBGMODPE pModPe, int32_t iSegment, KDBGADDR off, uint32_t *puRVA)
     65static int kDbgModPeSegOffToRVA(PKDBGMODPE pModPe, int32_t iSegment, KDBGADDR off, uint32_t *puRVA)
    6666{
    6767    if (iSegment >= 0)
     
    8383        return 0;
    8484    }
    85     AssertMsgFailedReturn(("iSegment=%RI32\n", iSegment), KDBG_ERR_INVALID_ADDRESS);
     85    kDbgAssertMsgFailedReturn(("iSegment=%d\n", iSegment), KDBG_ERR_INVALID_ADDRESS);
    8686}
    8787
     
    9797 * @param   poff        Where to store the segment offset.
    9898 */
    99 static int rtDbgModPeRVAToSegOff(PKDBGMODPE pModPe, uint32_t uRVA, int32_t *piSegment, KDBGADDR *poff)
     99static int kDbgModPeRVAToSegOff(PKDBGMODPE pModPe, uint32_t uRVA, int32_t *piSegment, KDBGADDR *poff)
    100100{
    101101    kDbgAssertMsgReturn(uRVA < pModPe->cbImage, ("uRVA=%x, cbImage=%x\n", uRVA, pModPe->cbImage),
     
    112112        }
    113113    }
    114     AssertMsgFailedReturn(("uRVA=%x\n", uRVA), KDBG_ERR_INVALID_ADDRESS);
     114    kDbgAssertMsgFailedReturn(("uRVA=%x\n", uRVA), KDBG_ERR_INVALID_ADDRESS);
    115115}
    116116
     
    119119 * @copydoc KDBGMODOPS::pfnQueryLine
    120120 */
    121 static DECLCALLBACK(int) rtDbgModPEQueryLine(PKDBGMOD pMod, int32_t iSegment, KDBGADDR off, PKDBGLINE pLine)
     121static int rtDbgModPEQueryLine(PKDBGMOD pMod, int32_t iSegment, KDBGADDR off, PKDBGLINE pLine)
    122122{
    123123    PKDBGMODPE pModPe = (PKDBGMODPE)pMod;
     
    127127     */
    128128    uint32_t uRVA;
    129     int rc = rtDbgModPeSegOffToRVA(pModPe, iSegment, off, &uRVA);
     129    int rc = kDbgModPeSegOffToRVA(pModPe, iSegment, off, &uRVA);
    130130    if (!rc)
    131131    {
     
    137137        {
    138138            pLine->RVA = (KDBGADDR)(Line.Address - pModPe->ImageBase);
    139             rc = rtDbgModPeRVAToSegOff(pModPe, pLine->RVA, &pLine->iSegment, &pLine->offSegment);
     139            rc = kDbgModPeRVAToSegOff(pModPe, pLine->RVA, &pLine->iSegment, &pLine->offSegment);
    140140            pLine->iLine = Line.LineNumber;
    141141            pLine->cchFile = strlen(Line.FileName);
     
    147147        {
    148148            DWORD Err = GetLastError();
    149             rc = RTErrConvertFromWin32(Err);
     149            rc = kDbgModPeConvWinError(Err);
    150150        }
    151151#endif
     
    159159 * @copydoc KDBGMODOPS::pfnQuerySymbol
    160160 */
    161 static DECLCALLBACK(int) rtDbgModPEQuerySymbol(PKDBGMOD pMod, int32_t iSegment, KDBGADDR off, PKDBGSYMBOL pSym)
     161static int rtDbgModPEQuerySymbol(PKDBGMOD pMod, int32_t iSegment, KDBGADDR off, PKDBGSYMBOL pSym)
    162162{
    163163    PKDBGMODPE pModPe = (PKDBGMODPE)pMod;
     
    167167     */
    168168    uint32_t uRVA;
    169     int rc = rtDbgModPeSegOffToRVA(pModPe, iSegment, off, &uRVA);
     169    int rc = kDbgModPeSegOffToRVA(pModPe, iSegment, off, &uRVA);
    170170    if (!rc)
    171171    {
     
    200200            {
    201201                pSym->RVA        = (KDBGADDR)(Buf.Sym.Address - pModPe->ImageBase);
    202                 rc = rtDbgModPeRVAToSegOff(pModPe, pSym->RVA, &pSym->iSegment, &pSym->offSegment);
     202                rc = kDbgModPeRVAToSegOff(pModPe, pSym->RVA, &pSym->iSegment, &pSym->offSegment);
    203203            }
    204204            pSym->cchName = (uint16_t)Buf.Sym.NameLen;
     
    211211        {
    212212            DWORD Err = GetLastError();
    213             rc = RTErrConvertFromWin32(Err);
     213            rc = kDbgModPeConvWinError(Err);
    214214        }
    215215#endif
     
    223223 * @copydoc KDBGMODOPS::pfnClose
    224224 */
    225 static DECLCALLBACK(int) rtDbgModPEClose(PKDBGMOD pMod)
     225static int rtDbgModPEClose(PKDBGMOD pMod)
    226226{
    227227    PKDBGMODPE pModPe = (PKDBGMODPE)pMod;
     
    231231    //
    232232    //DWORD Err = GetLastError();
    233     //int rc = RTErrConvertFromWin32(Err);
    234     //AssertMsgFailed(("SymInitialize failed: Err=%d rc=%Rrc\n", Err, rc));
     233    //int rc = kDbgModPeConvWinError(Err);
     234    //kDbgAssertMsgFailed(("SymInitialize failed: Err=%d rc=%Rrc\n", Err, rc));
    235235    //return rc;
    236236    return VERR_NOT_IMPLEMENTED;
     
    255255 * @returns IPRT status code.
    256256 *
    257  * @param   File                The handle to the module.
     257 * @param   pFile               The handle to the module.
    258258 * @param   offHdr              The offset of the PE header.
    259259 * @param   pszModulePath       The path to the module.
     
    261261 *
    262262 */
    263 int kdbgModPEOpen(RTFILE File, int64_t offHdr, const char *pszModulePath, PKDBGMOD *ppDbgMod)
     263int kdbgModPEOpen(PKDBGHLPFILE pFile, int64_t offHdr, const char *pszModulePath, PKDBGMOD *ppDbgMod)
    264264{
    265265    /*
     
    356356
    357357            DWORD Err = GetLastError();
    358             rc = RTErrConvertFromWin32(Err);
    359             AssertMsgFailed(("SymLoadModule64 failed: Err=%d rc=%Rrc\n", Err, rc));
     358            rc = kDbgModPeConvWinError(Err);
     359            kDbgAssertMsgFailed(("SymLoadModule64 failed: Err=%d rc=%Rrc\n", Err, rc));
    360360            g_pfnSymCleanup(hSymInst);
    361361        }
     
    363363        {
    364364            DWORD Err = GetLastError();
    365             rc = RTErrConvertFromWin32(Err);
    366             AssertMsgFailed(("SymInitialize failed: Err=%d rc=%Rrc\n", Err, rc));
     365            rc = kDbgModPeConvWinError(Err);
     366            kDbgAssertMsgFailed(("SymInitialize failed: Err=%d rc=%Rrc\n", Err, rc));
    367367        }
    368368#endif
Note: See TracChangeset for help on using the changeset viewer.