I can insert a .stream file (see previous post for what a .stream file data block contains) into an unindexed .pdb file via pdbstr -w as long as it has certain variables.
I still need to test what the minimum info needed is, right now I just copied and pasted from one that works. I will slowly delete variables from it until it doesn't work anymore.
Using cvs to pull a specific revision of a file looks like this: cvs export -r 1.23 filename
So - in my test.pdb.stream file I changed the CVS_EXTRACT_CMD to :
CVS_EXTRACT_CMD=%fnchdir%(%CVS_WORKINGDIR%)cvs.exe -d %fnvar%(%var2%) export -r %var4% -d %cvsdatetarg% %var3%
(p.s. %var#% are based on * delimited text in the source files section)
In the source files, i add a source file that contains cvs in the symbol file
like so:
SRCSRV: source files ---------------------------------------
c:\ff\mozilla\accessible\public\msaa\AccessibleMarshal.def*MYSERVER*mozilla/accessible/public/msaa/AccessibleMarshal.def*1.3
Then, when I write that to the accessiblemarshal.pdb file followed by a call to srctool -f on that .pdb file, I am greeted with a source indexed file that contains the cvs command that the source server will use to extract the source code when the time comes.
The result looks like this:
[c:\ff\mozilla\accessible\public\msaa\AccessibleMarshal.def] cmd: cvs.exe -d :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot export -r 1.3 -d 12-01-07 mozilla/accessible/public/msaa/AccessibleMarshal.def
c:\ff\mozilla\objdir_debugInfo\dist\crashreporter-symbols\2007120119\accessiblemarshal.pdb\8EEE4D7316254E22AE3D99EB4082744C3\accessiblemarshal.pdb: 1 source files are indexed - 199 are not
So now I need to learn how best to add this into the symbolstore.py file.
My first instinct is to add something in the ProcessFile function that keeps track of all the files that start with cvs, they look like this:
FILE 2 cvs:cvs-mirror.mozilla.org/cvsroot:mozilla/accessible/public/msaa/AccessibleMarshal.def:1.3
FILE 3 c:/program files/microsoft visual studio 8/vc/platformsdk/include/RpcNsi.h
I already did a little playing around with the python script and was able to insert some code here where I wrote if filename.startswith("cvs") then some debug statement to see that I could in fact catch the right lines (which I did).
So let's break it down:
- I need to track all lines that start with "cvs" and then turn these into proper file paths
- I need a (minimal) template .pdb.stream file that I can write the source file paths to in source files section
- Then I will call pdbstr -w and write that .pdb.stream (each named for the pdb it will write to) to the appropriate pdb file
The final hurdle - learn to write good python code to make this all happen.
No comments:
Post a Comment