Changeset 46165 in vbox for trunk/src/VBox/Runtime/common/dbg
- Timestamp:
- May 19, 2013 7:07:50 PM (12 years ago)
- Location:
- trunk/src/VBox/Runtime/common/dbg
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/dbg/dbgas.cpp
r46134 r46165 1696 1696 1697 1697 1698 /** 1699 * Query a line number by address. 1700 * 1701 * @returns IPRT status code. See RTDbgModSymbolAddrA for more specific ones. 1702 * @retval VERR_INVALID_HANDLE if hDbgAs is invalid. 1703 * @retval VERR_NOT_FOUND if the address couldn't be mapped to a module. 1704 * 1705 * @param hDbgAs The address space handle. 1706 * @param Addr The address which closest symbol is requested. 1707 * @param poffDisp Where to return the distance between the line 1708 * number and address. 1709 * @param pLine Where to return the line number information. 1710 */ 1711 RTDECL(int) RTDbgAsLineByAddr(RTDBGAS hDbgAs, RTUINTPTR Addr, PRTINTPTR poffDisp, PRTDBGLINE pLine) 1698 RTDECL(int) RTDbgAsLineByAddr(RTDBGAS hDbgAs, RTUINTPTR Addr, PRTINTPTR poffDisp, PRTDBGLINE pLine, PRTDBGMOD phMod) 1712 1699 { 1713 1700 /* … … 1729 1716 int rc = RTDbgModLineByAddr(hMod, iSeg, offSeg, poffDisp, pLine); 1730 1717 if (RT_SUCCESS(rc)) 1718 { 1731 1719 rtDbgAsAdjustLineAddress(pLine, hMod, MapAddr, iSeg); 1732 RTDbgModRelease(hMod); 1720 if (phMod) 1721 *phMod = hMod; 1722 else 1723 RTDbgModRelease(hMod); 1724 } 1725 else 1726 RTDbgModRelease(hMod); 1733 1727 return rc; 1734 1728 } … … 1736 1730 1737 1731 1738 /** 1739 * Query a line number by address. 1740 * 1741 * @returns IPRT status code. See RTDbgModSymbolAddrA for more specific ones. 1742 * @retval VERR_INVALID_HANDLE if hDbgAs is invalid. 1743 * @retval VERR_NOT_FOUND if the address couldn't be mapped to a module. 1744 * 1745 * @param hDbgAs The address space handle. 1746 * @param Addr The address which closest symbol is requested. 1747 * @param poffDisp Where to return the distance between the line 1748 * number and address. 1749 * @param ppLine Where to return the pointer to the allocated line 1750 * number info. Always set. Free with RTDbgLineFree. 1751 */ 1752 RTDECL(int) RTDbgAsLineByAddrA(RTDBGAS hDbgAs, RTUINTPTR Addr, PRTINTPTR poffDisp, PRTDBGLINE *ppLine) 1732 RTDECL(int) RTDbgAsLineByAddrA(RTDBGAS hDbgAs, RTUINTPTR Addr, PRTINTPTR poffDisp, PRTDBGLINE *ppLine, PRTDBGMOD phMod) 1753 1733 { 1754 1734 /* … … 1770 1750 int rc = RTDbgModLineByAddrA(hMod, iSeg, offSeg, poffDisp, ppLine); 1771 1751 if (RT_SUCCESS(rc)) 1752 { 1772 1753 rtDbgAsAdjustLineAddress(*ppLine, hMod, MapAddr, iSeg); 1773 RTDbgModRelease(hMod); 1754 if (phMod) 1755 *phMod = hMod; 1756 else 1757 RTDbgModRelease(hMod); 1758 } 1759 else 1760 RTDbgModRelease(hMod); 1774 1761 return rc; 1775 1762 } -
trunk/src/VBox/Runtime/common/dbg/dbgmod.cpp
r46164 r46165 486 486 return VINF_SUCCESS; 487 487 } 488 pDbgMod->pDbgVt = NULL; 488 489 pDbgMod->pDbgVt = NULL; 489 490 Assert(pDbgMod->pvDbgPriv == NULL); 490 491 } … … 530 531 return VINF_CALLBACK_RETURN; 531 532 } 532 pDbgMod->pDbgVt = NULL; 533 534 pDbgMod->pDbgVt = NULL; 533 535 Assert(pDbgMod->pvDbgPriv == NULL); 534 536 } 537 RTSemRWReleaseRead(g_hDbgModRWSem); 535 538 } 536 539 537 540 /* No joy. */ 538 RTSemRWReleaseRead(g_hDbgModRWSem);539 541 RTStrCacheRelease(g_hDbgModStrCache, pDbgMod->pszDbgFile); 540 542 pDbgMod->pszDbgFile = NULL; … … 843 845 if (RT_SUCCESS(rc)) 844 846 { 847 /* 848 * We're done! 849 */ 850 ASMAtomicIncU32(&pImg->cUsers); 851 RTSemRWReleaseRead(g_hDbgModRWSem); 852 845 853 *phDbgMod = pDbgMod; 846 854 return VINF_SUCCESS; -
trunk/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp
r46164 r46165 3696 3696 pSubProgram->PcRange.uHighAddress - pSubProgram->PcRange.uLowAddress, 3697 3697 0 /*fFlags*/, NULL /*piOrdinal*/); 3698 Assert RC(rc);3698 AssertMsg(RT_SUCCESS(rc) || rc == VERR_DBG_DUPLICATE_SYMBOL, ("%Rrc\n", rc)); 3699 3699 } 3700 3700 else
Note:
See TracChangeset
for help on using the changeset viewer.