tools/symsrc/source_index.py
def ExtractSourceFiles(pdb_filename, toolchain_dir):
  """Extract a list of local paths of the source files from a PDB."""

  # Don't use |RunCommand| as it expect the return code to be 0 on success but
  # srctool returns the number of files instead.
  srctool = subprocess.Popen([FindSrcSrvFile('srctool.exe', toolchain_dir),
                              '-r', pdb_filename],
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                             universal_newlines=True)
  src_files, _ = srctool.communicate()

  if (not src_files or src_files.startswith("srctool: ") or
      srctool.returncode <= 0):
    raise Exception("srctool failed: " + src_files)
  return set(
      x.rstrip('\n').lower() for x in src_files.split('\n') if len(x) != 0)
Extract a list of local paths of the source files from a PDB.
Extract a list of local paths of the source files from a PDB.
Extract a list of local paths of the source files from a PDB .
def ExtractSourceFiles(pdb_filename, toolchain_dir):
  srctool = subprocess.Popen([FindSrcSrvFile('srctool.exe', toolchain_dir),
                              '-r', pdb_filename],
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                             universal_newlines=True)
  src_files, _ = srctool.communicate()
  if (not src_files or src_files.startswith("srctool: ") or
      srctool.returncode <= 0):
    raise Exception("srctool failed: " + src_files)
  return set(
      x.rstrip('\n').lower() for x in src_files.split('\n') if len(x) != 0)
def ExtractSourceFiles ( pdb_filename , toolchain_dir ) : srctool = subprocess . Popen ( [ FindSrcSrvFile ( 'srctool.exe' , toolchain_dir ) , '-r' , pdb_filename ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE , universal_newlines = True ) src_files , _ = srctool . communicate ( ) if ( not src_files or src_files . startswith ( "srctool: " ) or srctool . returncode <= 0 ) : raise Exception ( "srctool failed: " + src_files ) return set ( x . rstrip ( '\n' ) . lower ( ) for x in src_files . split ( '\n' ) if len ( x ) != 0 )
Extract a list of local paths of the source files from a PDB.
Extract a list of local paths of the source files from a PDB .
"""Extract a list of local paths of the source files from a PDB.""" # Don't use |RunCommand| as it expect the return code to be 0 on success but # srctool returns the number of files instead.
pdb_filename
toolchain_dir