Injected DLL can't use Symbols pdb unless it's in the same directory as build

北城以北 提交于 2019-12-25 04:47:15

问题


I have an issue where I'm trying to selectively distribute my pdb(symbol) file so I can have users give me more detailed crash reports.

So... my DLL is injected into another exe (in another folder). And from everything I've tested, my PDB file has to be located in the exact same directory on the users machine that it is on my machine for it to be found correctly.

IE... When I build I place the PDB in C:\PDB\Mypdb.pdb

If the user creates the exact folder and places the pdb there, the injected dll will show him line numbers on crash. However, if he places the mypdb.pdb with the dll, or with the target of the injection, they receive nothing in terms of symbols.

Any ideas on how I can force my DLL to use a symbols file at a custimizable location?


回答1:


This is because by default the linker uses an absolute path to the location where it generates PDB file and stores it in the DLL itself. You can change the path to the PDB file by passing the /PDBALTPATH option and a relative path to the linker.



来源:https://stackoverflow.com/questions/31363404/injected-dll-cant-use-symbols-pdb-unless-its-in-the-same-directory-as-build

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!