bug 520141 - fix source server support to work with pdb compression. r=bsmedberg

This commit is contained in:
Ted Mielczarek 2009-10-03 14:52:37 -04:00
Родитель 3f687ed5c1
Коммит ee89a1ee99
1 изменённых файлов: 8 добавлений и 11 удалений

Просмотреть файл

@ -546,11 +546,11 @@ class Dumper:
# we output relative paths so callers can get a list of what
# was generated
print rel_path
if self.srcsrv and vcs_root:
# add source server indexing to the pdb file
self.SourceServerIndexing(file, guid, sourceFileStream, vcs_root)
if self.copy_debug:
self.CopyDebug(file, debug_file, guid)
if self.srcsrv and vcs_root:
# Call on SourceServerIndexing
self.SourceServerIndexing(debug_file, guid, sourceFileStream, vcs_root)
except StopIteration:
pass
except:
@ -616,20 +616,17 @@ class Dumper_Win32(Dumper):
def SourceServerIndexing(self, debug_file, guid, sourceFileStream, vcs_root):
# Creates a .pdb.stream file in the mozilla\objdir to be used for source indexing
cwd = os.getcwd()
debug_file = os.path.abspath(debug_file)
streamFilename = debug_file + ".stream"
stream_output_path = os.path.join(cwd, streamFilename)
stream_output_path = os.path.abspath(streamFilename)
# Call SourceIndex to create the .stream file
result = SourceIndex(sourceFileStream, stream_output_path, vcs_root)
if self.copy_debug:
pdbstr_path = os.environ.get("PDBSTR_PATH")
pdbstr = os.path.normpath(pdbstr_path)
pdb_rel_path = os.path.join(debug_file, guid, debug_file)
pdb_filename = os.path.normpath(os.path.join(self.symbol_path, pdb_rel_path))
# move to the dir with the stream files to call pdbstr
os.chdir(os.path.dirname(stream_output_path))
os.spawnv(os.P_WAIT, pdbstr, [pdbstr, "-w", "-p:" + pdb_filename, "-i:" + streamFilename, "-s:srcsrv"])
call([pdbstr, "-w", "-p:" + os.path.basename(debug_file),
"-i:" + os.path.basename(streamFilename), "-s:srcsrv"],
cwd=os.path.dirname(stream_output_path))
# clean up all the .stream files when done
os.remove(stream_output_path)
return result