VirtualBox

Changeset 43686 in vbox


Ignore:
Timestamp:
Oct 18, 2012 5:29:46 PM (12 years ago)
Author:
vboxsync
Message:

Solaris/coredumper: Remove dead code. Can't use RTDirOpen while dumping core.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/solaris/coredumper-solaris.cpp

    r43685 r43686  
    12641264    AssertReturn(pSolCore, VERR_INVALID_POINTER);
    12651265
    1266 #if 1
    12671266    uint64_t cThreads;
    12681267    return rtCoreDumperForEachThread(pSolCore, &cThreads, resumeThread);
    1269 #else
    1270     PRTSOLCOREPROCESS pSolProc = &pSolCore->SolProc;
    1271 
    1272     char szCurThread[128];
    1273     char szPath[PATH_MAX];
    1274     PRTDIR pDir = NULL;
    1275 
    1276     RTStrPrintf(szPath, sizeof(szPath), "/proc/%d/lwp", (int)pSolProc->Process);
    1277     RTStrPrintf(szCurThread, sizeof(szCurThread), "%d", (int)pSolProc->hCurThread);
    1278 
    1279     int32_t cRunningThreads = 0;
    1280     int rc = RTDirOpen(&pDir, szPath);
    1281     if (RT_SUCCESS(rc))
    1282     {
    1283         /*
    1284          * Loop through all our threads & resume them.
    1285          */
    1286         RTDIRENTRY DirEntry;
    1287         while (RT_SUCCESS(RTDirRead(pDir, &DirEntry, NULL)))
    1288         {
    1289             if (   !strcmp(DirEntry.szName, ".")
    1290                 || !strcmp(DirEntry.szName, ".."))
    1291                 continue;
    1292 
    1293             if ( !strcmp(DirEntry.szName, szCurThread))
    1294                 continue;
    1295 
    1296             int32_t ThreadId = RTStrToInt32(DirEntry.szName);
    1297             _lwp_continue((lwpid_t)ThreadId);
    1298             ++cRunningThreads;
    1299         }
    1300 
    1301         CORELOG((CORELOG_NAME "ResumeAllThreads: resumed %d threads\n", cRunningThreads));
    1302         RTDirClose(pDir);
    1303     }
    1304     else
    1305     {
    1306         CORELOGRELSYS((CORELOG_NAME "ResumeAllThreads: Failed to open %s\n", szPath));
    1307         rc = VERR_READ_ERROR;
    1308     }
    1309     return rc;
    1310 #endif
    13111268}
    13121269
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette