VirtualBox

Changeset 67062 in vbox for trunk/src/VBox/ValidationKit


Ignore:
Timestamp:
May 24, 2017 12:29:07 PM (8 years ago)
Author:
vboxsync
Message:

ValidationKit: common/utils.py: doesn't work reliably on Windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/common/utils.py

    r66818 r67062  
    840840            [ '/usr/bin/pmap', '%u' % (uPid,), ],
    841841        ];
    842     elif sHostOs == 'win':
    843         # There are quite a few possibilities on Windows where to find CDB.
    844         asCdbPathsCheck = [
    845                               'c:\\Program Files\\Debugging Tools for Windows',
    846                               'c:\\Program Files\\Debugging Tools for Windows (x64)',
    847                               'c:\\Program Files\\Debugging Tools for Windows (x86)',
    848                               'c:\\Program Files\\Windows Kits',
    849                               'c:\\Program Files\\Windows Kits (x64)',
    850                               'c:\\Program Files\\Windows Kits (x86)',
    851                               'c:\\Programme\\Debugging Tools for Windows',
    852                               'c:\\Programme\\Debugging Tools for Windows (x64)',
    853                               'c:\\Programme\\Debugging Tools for Windows (x86)',
    854                               'c:\\Programme\\Windows Kits',
    855                               'c:\\Programme\\Windows Kits (x64)',
    856                               'c:\\Programme\\Windows Kits (x86)'
    857                           ];
    858 
    859         sWinCdb = 'cdb'; # CDB must be in the path; better than nothing if we can't find anything in the paths above.
    860         for sPath in asCdbPathsCheck:
    861             fFound = False;
    862             try:
    863                 for sDirPath, _, asFiles in os.walk(sPath):
    864                     if 'cdb.exe' in asFiles:
    865                         sWinCdb = os.path.join(sDirPath, 'cdb.exe');
    866                         fFound = True;
    867                         break;
    868             except:
    869                 pass;
    870 
    871             if fFound:
    872                 break;
    873 
    874         #
    875         # The commands used to gather the information are quite cryptic so they are explained
    876         # below:
    877         #     ~* f    -> Freeze all threads
    878         #     ~* k    -> Acquire stack traces for all threads
    879         #     lm -v   -> List of loaded modules, verbose
    880         #     ~* u    -> Unfreeze all threads
    881         #     .detach -> Detach from target process
    882         #     q       -> Quit CDB
    883         #
    884         aasCmd = [[sWinCdb, '-p', '%u' % (uPid,), '-c', '~* f; ~* k; lm -v; ~* u; .detach; q'],];
    885842    else:
    886843        aasCmd = [];
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