4

Is there a way to change path of pdb file in headers of dll file from absolute to relative?

For example, if I do dumpbin /headers on my library file i get:

Time Type Size RVA Pointer -------- ------ -------- -------- -------- 4AE9A239 cv 4F 0001A9A8 197A8 Format: RSDS, {7B0C89D0-69E1-4A12-817C-424F209FAB10}, 1, D:\Projects\workspace\bin\Release\MyLibrary.pdb

Instead of D:\Projects\workspace\bin\release\MyLibrary.pdb, I want to show only bin\release\MyLibrary.pdb or just MyLibrary.pdb.

I have seen solution for this problem in case of C/C++ assembly but I didn't got any solution for C# assembly although there are many microsoft C# assemblies having this relative path feature.

Does anyone know how to do this?

Matt Johnson-Pint
  • 230,703
  • 74
  • 448
  • 575
  • There is a tool called [peupdate](http://bytepointer.com/tools/index.htm#peupdate) that will allow you to change the PDB debug info string to anything string you want (among other options). Since it works on PE32 files, it doesn't matter whether the binary is managed (.NET) or unmanaged code. To change the PDB path you might use: "peupdate -u " – byteptr Sep 10 '16 at 00:36

1 Answers1

0

Yes, possbile via the /PDBALTPATH linker flag. See more in MSDN

egur
  • 7,830
  • 2
  • 27
  • 47