From ee89a1ee998931ef85ea42ff6b214d6bb18187b5 Mon Sep 17 00:00:00 2001 From: Ted Mielczarek Date: Sat, 3 Oct 2009 14:52:37 -0400 Subject: [PATCH] bug 520141 - fix source server support to work with pdb compression. r=bsmedberg --- toolkit/crashreporter/tools/symbolstore.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/toolkit/crashreporter/tools/symbolstore.py b/toolkit/crashreporter/tools/symbolstore.py index 511d40afb9d6..0f313b4fa585 100755 --- a/toolkit/crashreporter/tools/symbolstore.py +++ b/toolkit/crashreporter/tools/symbolstore.py @@ -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