Skip to content

Commit

Permalink
add support for VS 2015
Browse files Browse the repository at this point in the history
  • Loading branch information
rainers committed Jun 3, 2015
1 parent 30b9882 commit b5dcff3
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,4 @@ unreleased Version 0.22

* last version introduced a regression that could cause DWARF conversion to crash
* DWARF sections now stripped from image (if last sections)
* add support for VS 2015
1 change: 1 addition & 0 deletions src/cv2pdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3049,6 +3049,7 @@ bool CV2PDB::writeSymbols(mspdb::Mod* mod, DWORD* data, int databytes, int prefi
mspdb::vsVersion == 10 ? "cannot add symbols to module, probably msobj100.dll missing"
: mspdb::vsVersion == 11 ? "cannot add symbols to module, probably msobj110.dll missing"
: mspdb::vsVersion == 12 ? "cannot add symbols to module, probably msobj120.dll missing"
: mspdb::vsVersion == 14 ? "cannot add symbols to module, probably msobj140.dll missing"
: "cannot add symbols to module, probably msobj80.dll missing");
return true;
}
Expand Down
18 changes: 18 additions & 0 deletions src/mspdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ char* mspdb80_dll = "mspdb80.dll";
char* mspdb100_dll = "mspdb100.dll";
char* mspdb110_dll = "mspdb110.dll";
char* mspdb120_dll = "mspdb120.dll";
char* mspdb140_dll = "mspdb140.dll";
// char* mspdb110shell_dll = "mspdbst.dll"; // the VS 2012 Shell uses this file instead of mspdb110.dll, but is missing mspdbsrv.exe

int mspdb::vsVersion = 8;
Expand Down Expand Up @@ -134,6 +135,21 @@ void tryLoadMsPdb120(bool throughPath)
}
}

void tryLoadMsPdb140(bool throughPath)
{
if (!modMsPdb)
{
if(throughPath)
modMsPdb = LoadLibraryA(mspdb140_dll);
if (!modMsPdb && !throughPath)
tryLoadMsPdb("VisualStudio\\14.0", mspdb140_dll, "..\\..\\VC\\bin\\");
if (!modMsPdb && !throughPath)
tryLoadMsPdb("VSWinExpress\\14.0", mspdb140_dll, "..\\..\\VC\\bin\\");
if (modMsPdb)
mspdb::vsVersion = 14;
}
}

bool initMsPdb()
{
#if 0 // might cause problems when combining VS Shell 2010 with VS 2008 or similar
Expand All @@ -149,11 +165,13 @@ bool initMsPdb()
#endif

// try loading through the PATH first to best match current setup
tryLoadMsPdb140(true);
tryLoadMsPdb120(true);
tryLoadMsPdb110(true);
tryLoadMsPdb100(true);
tryLoadMsPdb80(true);

tryLoadMsPdb140(false);
tryLoadMsPdb120(false);
tryLoadMsPdb110(false);
tryLoadMsPdb100(false);
Expand Down

0 comments on commit b5dcff3

Please sign in to comment.