Skip to main content

Source indexing package

Project description

Source Indexing

Python script to add source indexing to .PDB files. The source will be automatically pulled from Git or SubVersion. The python script can be invoked on each .PDB file after the link phase of the build is completed. Alternatively, the script can receive a list of one or more directories where the .PDBs are placed at the end of the build. Internally, the script simply scans each directory recursively and invoke itself on each file with .pdb extension. The script takes the following arguments:

-p, --pdb - Path to .PDB file to process (e.g.: -p c:\path\file.pdb). (see also: --pdbs option).
-P, --pdbs - One or more directories containing .PDB files (e.g.: --pdbs dir1 dir2 ...). The script will recurs to each sub-directory under the specified list. The path is assumed to be fully-qualified or relative to --build-base.
-b, --build-base - Root of the build directory. This path correspond with top of the repository branch being built.
-r, --branch - Remote repository branch.
-j, --project' - Repository project (location of cached source). This optional argument will be set to the same value as --branch by default.
-x, --extensions - Semicolon separated list of source extensions (default:cpp;c;h).
-s, --srcsrv - Path to SDK or DDK source indexing directory. Default path is C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\srcsrv (Windows 8.0 DTfW or newer required).
-c, --scheme - Repository server scheme. Default scheme is https://
-u, --plugin - Plugin class. default is srcsrv.plugins.Git. Plugin classes available in current version: srcsrv.plugins.Git, srcsrv.plugins.SVN.
-c, --scheme - Repository server scheme (default: 'https://).

Build diagnostic options

-o, --output - Path of the source indexing file used for the srcsrv stream in the .PDB. If this parameter is not used if --pdbs option is present. The script will use a file with the same name as the binary with .ini extension (i.e.: prog.exe will produce prog.pdb which is embedded with prog.ini). For build troubleshooting you can use the --pdb option without specifying --output file. The content of this file is sent to stdout and the .PDB will not be modified (see: --no-process).
-k, --keep - Be default the file specified by the --output parameter (or .ini file) is deleted after processing. With this option specified the file is kept in the same directory as the .PDB.
-n, --no-process - The script is run without modifying the .PDB. Should be used with with --keep option or with logging enabled.
-l, --log - Path to log file. By default all logging is visible in stdout.

Git options

-I, --uri - Git repository server URI. default github.com
-X, --hexsha - Provide repository hash instead of querying Git for hash of the build.

Git environment
GITHUB_TOKEN - User token or credentials (e.g. user_name:password)
For indexing, Git command line tools are required to be installed and added to the path.
For debugging, cURL command line tool must be installed and added to the path.

SubVersion options

-I, --uri - SubVersion repository server URI.
-R, --revision - Repository revision instead of querying SVN revision of the build.

SVN environment
SVN_CREDS - User credentials. This is expected to be the string: --username user --password password
For indexing and debugging, SubVersion command line tools are required to be installed and added to the path.

Note: Credentials for secured access must be set in order to allow the debugger to automatically download the indexed source. GITHUB_TOKEN or SVN_CREDS can be set as an environment variable or in srcsrv.ini file.

The script can also be invoked with a response file. Using @path\resp_file_name. The file can contain any of the above parameters. Response file and command line parameters can be combined. Example:

--build-base D:\dev\svn\myproject
--uri mysubversion.com
--pdbs debug release amd64dbg amd64rel  
--branch myrepo/myproj/trunk
--project myrepo/myproj
--log ..\srcsrv.log
--plugin srcsrv.plugins.SVN

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

srcsrv-1.1.0.tar.gz (10.0 kB view hashes)

Uploaded Source

Built Distribution

srcsrv-1.1.0-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page