Changeset 89971 in vbox for trunk/src/VBox/Runtime/common/dbg
- Timestamp:
- Jun 30, 2021 9:37:27 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/dbg/dbgcfg.cpp
r82968 r89971 729 729 if (!pszCacheSubDir || !*pszCacheSubDir) 730 730 return VWRN_NOT_FOUND; 731 if (!(fFlags & RTDBGCFG_O_SYMSRV)) 731 if ( !(fFlags & RTDBGCFG_O_SYMSRV) 732 && !(fFlags & RTDBGCFG_O_DEBUGINFOD)) 732 733 return VWRN_NOT_FOUND; 733 734 … … 794 795 RTHttpSetFollowRedirects(hHttp, 8); 795 796 796 static const char * const s_apszHeaders [] =797 static const char * const s_apszHeadersMsSymSrv[] = 797 798 { 798 799 "User-Agent: Microsoft-Symbol-Server/6.6.0999.9", … … 800 801 }; 801 802 802 rc = RTHttpSetHeaders(hHttp, RT_ELEMENTS(s_apszHeaders), s_apszHeaders); 803 static const char * const s_apszHeadersDebuginfod[] = 804 { 805 "User-Agent: IPRT DbgCfg 1.0", 806 "Pragma: no-cache", 807 }; 808 809 if (fFlags & RTDBGCFG_O_SYMSRV) 810 rc = RTHttpSetHeaders(hHttp, RT_ELEMENTS(s_apszHeadersMsSymSrv), s_apszHeadersMsSymSrv); 811 else /* Must be debuginfod. */ 812 rc = RTHttpSetHeaders(hHttp, RT_ELEMENTS(s_apszHeadersDebuginfod), s_apszHeadersDebuginfod); 803 813 if (RT_SUCCESS(rc)) 804 814 { 805 RTStrPrintf(szUrl, sizeof(szUrl), "%s/%s/%s/%s", pszServer, pszFilename, pszCacheSubDir, pszFilename); 815 if (fFlags & RTDBGCFG_O_SYMSRV) 816 RTStrPrintf(szUrl, sizeof(szUrl), "%s/%s/%s/%s", pszServer, pszFilename, pszCacheSubDir, pszFilename); 817 else 818 RTStrPrintf(szUrl, sizeof(szUrl), "%s/buildid/%s/debuginfo", pszServer, pszCacheSubDir); 806 819 807 820 /** @todo Use some temporary file name and rename it after the operation … … 815 828 rtDbgCfgLog1(pThis, "%Rrc on URL '%s'\n", rc, szUrl); 816 829 } 817 if (rc == VERR_HTTP_NOT_FOUND) 830 if ( rc == VERR_HTTP_NOT_FOUND 831 && (fFlags & RTDBGCFG_O_SYMSRV)) 818 832 { 819 833 /* Try the compressed version of the file. */ … … 1390 1404 RT_OPSYS_UNKNOWN | RTDBGCFG_O_EXT_DEBUG_FILE, 1391 1405 pfnCallback, pvUser1, pvUser2); 1406 } 1407 1408 1409 RTDECL(int) RTDbgCfgOpenDwoBuildId(RTDBGCFG hDbgCfg, const char *pszFilename, const uint8_t *pbBuildId, 1410 size_t cbBuildId, PFNRTDBGCFGOPEN pfnCallback, void *pvUser1, void *pvUser2) 1411 { 1412 char *pszSubDir = NULL; 1413 int rc = RTStrAPrintf(&pszSubDir, "%#.*Rhxs", cbBuildId, pbBuildId); 1414 if (RT_SUCCESS(rc)) 1415 { 1416 rc = rtDbgCfgOpenWithSubDir(hDbgCfg, pszFilename, pszSubDir, NULL, 1417 RTDBGCFG_O_DEBUGINFOD | RT_OPSYS_UNKNOWN | RTDBGCFG_O_EXT_DEBUG_FILE, 1418 pfnCallback, pvUser1, pvUser2); 1419 RTStrFree(pszSubDir); 1420 } 1421 1422 return rc; 1392 1423 } 1393 1424
Note:
See TracChangeset
for help on using the changeset viewer.