- Timestamp:
- May 24, 2013 7:23:08 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/dbg/dbgmoddwarf.cpp
r46205 r46260 1471 1471 } 1472 1472 1473 return pThis->pImgMod->pImgVt->pfnRvaToSegOffset(pThis->pImgMod, LinkAddress, piSeg, poffSeg);1474 //return pThis->pImgMod->pImgVt->pfnLinkAddressToSegOffset(pThis->pImgMod, LinkAddress, piSeg, poffSeg);1473 //return pThis->pImgMod->pImgVt->pfnRvaToSegOffset(pThis->pImgMod, LinkAddress, piSeg, poffSeg); 1474 return pThis->pImgMod->pImgVt->pfnLinkAddressToSegOffset(pThis->pImgMod, LinkAddress, piSeg, poffSeg); 1475 1475 } 1476 1476 … … 2335 2335 RTUINTPTR offSeg; 2336 2336 rc = rtDbgModDwarfLinkAddressToSegOffset(pLnState->pDwarfMod, pLnState->Regs.uSegment, pLnState->Regs.uAddress, 2337 &iSeg, &offSeg); AssertRC(rc);2337 &iSeg, &offSeg); /*AssertRC(rc);*/ 2338 2338 if (RT_SUCCESS(rc)) 2339 2339 { … … 3706 3706 pSubProgram->PcRange.uLowAddress, 3707 3707 &iSeg, &offSeg); 3708 AssertRC(rc);3709 3708 if (RT_SUCCESS(rc)) 3710 3709 { … … 3714 3713 AssertMsg(RT_SUCCESS(rc) || rc == VERR_DBG_DUPLICATE_SYMBOL, ("%Rrc\n", rc)); 3715 3714 } 3715 else if ( pSubProgram->PcRange.uLowAddress == 0 /* see with vmlinux */ 3716 && pSubProgram->PcRange.uHighAddress == 0) 3717 { 3718 Log5(("rtDbgModDwarfLinkAddressToSegOffset: Ignoring empty range.\n")); 3719 rc = VINF_SUCCESS; /* ignore */ 3720 } 3716 3721 else 3722 { 3723 AssertRC(rc); 3717 3724 Log5(("rtDbgModDwarfLinkAddressToSegOffset failed: %Rrc\n", rc)); 3725 } 3718 3726 } 3719 3727 } … … 3850 3858 3851 3859 /** 3860 * Free all children of a DIE. 3861 * 3862 * @param pThis The DWARF instance. 3863 * @param pParent The parent DIE. 3864 */ 3865 static void rtDwarfInfo_FreeChildren(PRTDBGMODDWARF pThis, PRTDWARFDIE pParentDie) 3866 { 3867 PRTDWARFDIE pChild, pNextChild; 3868 RTListForEachSafe(&pParentDie->ChildList, pChild, pNextChild, RTDWARFDIE, SiblingNode) 3869 { 3870 if (!RTListIsEmpty(&pChild->ChildList)) 3871 rtDwarfInfo_FreeChildren(pThis, pChild); 3872 RTListNodeRemove(&pChild->SiblingNode); 3873 #ifdef RTDBGMODDWARF_WITH_MEM_CACHE 3874 RTMemCacheFree(pThis->aDieAllocators[pChild->iAllocator].hMemCache, pChild); 3875 #else 3876 RTMemFree(pChild); 3877 #endif 3878 } 3879 } 3880 3881 3882 /** 3883 * Free a DIE an all its children. 3884 * 3885 * @param pThis The DWARF instance. 3886 * @param pDie The DIE to free. 3887 */ 3888 static void rtDwarfInfo_FreeDie(PRTDBGMODDWARF pThis, PRTDWARFDIE pDie) 3889 { 3890 rtDwarfInfo_FreeChildren(pThis, pDie); 3891 RTListNodeRemove(&pDie->SiblingNode); 3892 #ifdef RTDBGMODDWARF_WITH_MEM_CACHE 3893 RTMemCacheFree(pThis->aDieAllocators[pDie->iAllocator].hMemCache, pDie); 3894 #else 3895 RTMemFree(pChild); 3896 #endif 3897 } 3898 3899 3900 /** 3852 3901 * Skips a form. 3853 3902 * @returns IPRT status code … … 4123 4172 } 4124 4173 cDepth--; 4125 4126 /* Unlink and free child DIEs if told to do so. */4127 4174 if (!fKeepDies && pParentDie->pParent) 4128 { 4129 PRTDWARFDIE pChild, pNextChild; 4130 RTListForEachSafe(&pParentDie->ChildList, pChild, pNextChild, RTDWARFDIE, SiblingNode) 4131 { 4132 RTListNodeRemove(&pChild->SiblingNode); 4133 #ifdef RTDBGMODDWARF_WITH_MEM_CACHE 4134 RTMemCacheFree(pThis->aDieAllocators[pChild->iAllocator].hMemCache, pChild); 4135 #else 4136 RTMemFree(pChild); 4137 #endif 4138 } 4139 } 4175 rtDwarfInfo_FreeChildren(pThis, pParentDie); 4140 4176 } 4141 4177 else … … 4181 4217 if (RT_FAILURE(rc)) 4182 4218 return rc; 4219 4220 if (!fKeepDies && !pAbbrev->fChildren) 4221 rtDwarfInfo_FreeDie(pThis, pNewDie); 4183 4222 } 4184 4223 } /* while more DIEs */ 4224 4225 4226 /* Unlink and free child DIEs if told to do so. */ 4227 if (!fKeepDies) 4228 rtDwarfInfo_FreeChildren(pThis, &pUnit->Core); 4185 4229 4186 4230 return RT_SUCCESS(rc) ? pCursor->rc : rc;
Note:
See TracChangeset
for help on using the changeset viewer.