- Timestamp:
- Nov 11, 2015 3:57:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/dbg/dbgmodcodeview.cpp
r58662 r58664 528 528 529 529 int rc = RTDbgModSymbolAdd(pThis->hCnt, pszName, iSeg, off, cbSym, 0 /*fFlags*/, NULL); 530 531 /* Simple duplicate symbol mangling, just to get more details. */ 532 if (rc == VERR_DBG_DUPLICATE_SYMBOL && cchName < _2K) 533 { 534 char szTmpName[_2K + 96]; 535 memcpy(szTmpName, pszName, cchName); 536 szTmpName[cchName] = '_'; 537 for (uint32_t i = 1; i < 32; i++) 538 { 539 RTStrFormatU32(&szTmpName[cchName + 1], 80, i, 10, 0, 0, 0); 540 pszName = RTStrCacheEnterN(g_hDbgModStrCache, szTmpName, cchName + 1 + 1 + (i >= 10)); 541 rc = RTDbgModSymbolAdd(pThis->hCnt, pszName, iSeg, off, cbSym, 0 /*fFlags*/, NULL); 542 if (rc != VERR_DBG_DUPLICATE_SYMBOL) 543 break; 544 } 545 546 } 547 530 548 Log(("Symbol: %04x:%08x %.*s [%Rrc]\n", iSeg, off, cchName, pchName, rc)); 531 549 if (rc == VERR_DBG_ADDRESS_CONFLICT || rc == VERR_DBG_DUPLICATE_SYMBOL) … … 628 646 /** @todo add GProc and LProc so we can gather sizes as well as just symbols. */ 629 647 630 case kCvSymType_V3_LData: 631 case kCvSymType_V3_GData: 632 case kCvSymType_V3_Pub: 648 case kCvSymType_V3_Label: 633 649 { 634 650 PCRTCVSYMV3LABEL pLabel = (PCRTCVSYMV3LABEL)uCursor.pv; … … 637 653 if (cchName != UINT16_MAX && cchName > 0) 638 654 rc = rtDbgModCvAddSymbol(pThis, pLabel->iSection, pLabel->offSection, pLabel->szName, cchName, 0, 0); 655 else 656 Log3((" cchName=%#x sec:off=%#x:%#x %.*Rhxs\n", 657 cchName, pLabel->iSection, pLabel->offSection, cbRec, pLabel)); 658 break; 659 } 660 661 case kCvSymType_V3_LData: 662 case kCvSymType_V3_GData: 663 case kCvSymType_V3_Pub: 664 { 665 PCRTCVSYMV3TYPEDNAME pData = (PCRTCVSYMV3TYPEDNAME)uCursor.pv; 666 RTDBGMODCV_CHECK_NOMSG_RET_BF(cbRec >= sizeof(*pData)); 667 uint16_t cchName = rtDbgModCvValidateZeroString(pData->szName, pData, cbRec); 668 if (cchName != UINT16_MAX && cchName > 0) 669 rc = rtDbgModCvAddSymbol(pThis, pData->iSection, pData->offSection, pData->szName, cchName, 0, 0); 670 else 671 Log3((" cchName=%#x sec:off=%#x:%#x idType=%#x %.*Rhxs\n", 672 cchName, pData->iSection, pData->offSection, pData->idType, cbRec, pData)); 639 673 break; 640 674 } … … 649 683 rc = rtDbgModCvAddSymbol(pThis, pProc->iSection, pProc->offSection, pProc->szName, cchName, 650 684 0, pProc->cbProc); 685 else 686 Log3((" cchName=%#x sec:off=%#x:%#x LB %#x\n", 687 cchName, pProc->iSection, pProc->offSection, pProc->cbProc)); 651 688 break; 652 689 } … … 683 720 RTDBGMODCV_CHECK_RET_BF(cbSymTab > sizeof(RTCV8SYMBOLSBLOCK), ("cbSymTab=%zu\n", cbSymTab)); 684 721 PCRTCV8SYMBOLSBLOCK pBlockHdr = (PCRTCV8SYMBOLSBLOCK)uCursor.pv; 685 Log3((" 722 Log3((" %p: uType=%#04x LB %#x\n", (uint8_t *)pBlockHdr - (uint8_t *)pvSymTab, pBlockHdr->uType, pBlockHdr->cb)); 686 723 RTDBGMODCV_CHECK_RET_BF(pBlockHdr->cb <= cbSymTab - sizeof(RTCV8SYMBOLSBLOCK), 687 724 ("cb=%#u cbSymTab=%zu\n", pBlockHdr->cb, cbSymTab));
Note:
See TracChangeset
for help on using the changeset viewer.