Changeset 49118 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Oct 15, 2013 1:46:24 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/tools/RTDbgSymCache.cpp
r49080 r49118 143 143 144 144 145 /******************************************************************************* 146 * Internal Functions * 147 *******************************************************************************/ 148 static int rtDbgSymCacheAddDirWorker(char *pszPath, size_t cchPath, PRTDIRENTRYEX pDirEntry, PCRTDBGSYMCACHEADDCFG pCfg); 149 150 145 151 146 152 /** … … 717 723 * @param cchPath The length of the path up to the bundle name. 718 724 * @param cchName The length of the bundle name. 725 * @param pDirEntry The directory entry buffer, for handling bundle 726 * within bundle recursion. 719 727 * @param pCfg The configuration. 720 728 */ 721 static int rtDbgSymCacheAddImageBundle(char *pszPath, size_t cchPath, size_t cchName, PCRTDBGSYMCACHEADDCFG pCfg) 722 { 723 /* Assuming these are kexts or simple applications, we only add the image 724 file itself to the cache. No Info.plist or other files. */ 729 static int rtDbgSymCacheAddImageBundle(char *pszPath, size_t cchPath, size_t cchName, 730 PRTDIRENTRYEX pDirEntry, PCRTDBGSYMCACHEADDCFG pCfg) 731 { 732 /* 733 * Assuming these are kexts or simple applications, we only add the image 734 * file itself to the cache. No Info.plist or other files. 735 */ 725 736 /** @todo consider looking for Frameworks and handling framework bundles. */ 726 737 int rc = rtDbgSymCacheConstructBundlePath(pszPath, cchPath, cchName, "Contents/MacOS/", g_apszBundleSuffixes); 727 738 if (RT_SUCCESS(rc)) 728 739 rc = rtDbgSymCacheAddImageFile(pszPath, NULL, RTDBG_CACHE_UUID_MAP_DIR_IMAGES, pCfg); 740 741 /* 742 * Look for plugins and other sub-bundles. 743 */ 744 if (pCfg->fRecursive) 745 { 746 static char const * const s_apszSubBundleDirs[] = 747 { 748 "Contents/Plugins", 749 /** @todo Frameworks ++ */ 750 }; 751 for (uint32_t i = 0; i < RT_ELEMENTS(s_apszSubBundleDirs); i++) 752 { 753 pszPath[cchPath + cchName] = '\0'; 754 int rc2 = RTPathAppend(pszPath, RTPATH_MAX, s_apszSubBundleDirs[i]); 755 if (RT_SUCCESS(rc2)) 756 rc2 = rtDbgSymCacheAddDirWorker(pszPath, strlen(pszPath), pDirEntry, pCfg); 757 else 758 { 759 pszPath[cchPath + cchName] = '\0'; 760 RTMsgError("Error constructing bundle subdir path for '%s' + '%s': %Rrc", pszPath, s_apszSubBundleDirs[i], rc); 761 } 762 if (RT_FAILURE(rc2) && RT_SUCCESS(rc)) 763 rc = rc2; 764 } 765 } 766 729 767 return rc; 730 768 } … … 977 1015 978 1016 case RTDBGSYMCACHEFILETYPE_IMAGE_BUNDLE: 979 rc2 = rtDbgSymCacheAddImageBundle(pszPath, cchPath, pDirEntry->cbName, p Cfg);1017 rc2 = rtDbgSymCacheAddImageBundle(pszPath, cchPath, pDirEntry->cbName, pDirEntry, pCfg); 980 1018 break; 981 1019 … … 1095 1133 rc = rtDbgSymCacheAddDebugBundle(szPathBuf, cchPath - cchFilename, cchFilename, &Cfg); 1096 1134 else 1097 rc = rtDbgSymCacheAddImageBundle(szPathBuf, cchPath - cchFilename, cchFilename, &Cfg); 1135 { 1136 RTDIRENTRYEX DirEntry; 1137 rc = rtDbgSymCacheAddImageBundle(szPathBuf, cchPath - cchFilename, cchFilename, &DirEntry, &Cfg); 1138 } 1098 1139 } 1099 1140 else
Note:
See TracChangeset
for help on using the changeset viewer.