Bram

>>>> Patch
>>>> Problem: IMHO .pdb files should reside in the same directory as the
>>>>          corresponding .exe files so they can be distributet along
>>>>          with them.
>>>> 
>>> This doesn't matter for the distribution, the .pdb file can be moved
>>> around after generating it.  It might matter for when you want to run
>>> Vim right after compiling it.  I haven't tried it.
>>> 
>> [...]
>> Thus, if you have gvim, gvimd, vim and vimd in your
>> $VIMRUNTIME directory, you need four(!) subdirectories named
>> "OBJ..." there, each of them containing only one file: the
>> corresponding .PDB file.
>> 
>> Otherwise, you can't debug the executables without first guide your
>> debugger to the location where the corresponding .pdb file is stored.
> 
> Do you mean that the subdirectory is stored in the executable?
> 
Yes. Now I did some tests, but the results are not the same as I
mean to have experienced the first times when I started compiling
vim. Anyway:

The full (alas not relative) path to the .pdb file is stored in the
.exe file. Some information on this can be found here:

http://msdn2.microsoft.com/en-us/library/yd4f8bd1.aspx

Although stated otherwise in this link, I experienced that if the
.pdb can't be found at the location stored in the .exe file, it is
searched in the directory where the .exe file resides (and maybe
even in all directories listed in the PATH environment variable).

So that would invalidate my arguments above, but I have more arguments:

>> This is why I plead to make this patch an official one :-)
>> 
> The reason to put the .pdb file, and any other generated files,
> in a subdirectory is to keep the source directory clean.  And to
> have a different subdirectory for the various versions.
> 
1. The .pdb files are named like their corresponding .exe files
(vim.pdb, vimd.pdb, gvim.pdb, gvimd.pdb), while the .obj files (and
pathdef.c) have always the same name. So for the latter it makes
sense to store them into specially named directories in order to be
able to distinguish them, while the former ones can be distinguished
already by their file names.

2. If you change the configuration of, say, gvimd (e.g. add an
additional feature), the argument 1. above in not valid any more.
But in this case you anyway must delete (or move into the right
Obj... directory) the .exe file first, and the same is just true for
the .pdb file: .pdb files can be treated as a part of an .exe file
that is swapped out into a special file.

3. If you want to automate the process of building vim and move the
.exe and .pdb files together into an appropriate $VIMRUNTIME
directory by means of a BATCH or BASH script, then it is a nasty
task to code the cryptical name of the Obj... directory into that
script and change it whenever you change the list of features you
want to have compiled into your Vim. Not only isn't it easy to find
out the name of the Obj... directory that will be created by a
certain feature list, but you also must ensure that none of the
patches you may apply to the Vim sources changes that connection of
the feature list on the one hand and the name of the Obj...
directory on the other hand.

For all this reasons, I yet plead to put the .pdb file into the same
directory as the .exe files. But as I mentioned, it's only IMHO :-)

Best regards

Mathias

Reply via email to