注入的DLL不能使用Symbols pdb,除非它与build处于同一目录中 [英] Injected DLL can't use Symbols pdb unless it's in the same directory as build

查看:46
本文介绍了注入的DLL不能使用Symbols pdb,除非它与build处于同一目录中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到一个问题,我试图有选择地分发我的pdb(symbol)文件,以便可以让用户给我更详细的崩溃报告.

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.

所以...我的DLL被注入另一个exe(在另一个文件夹中).从我测试过的所有内容来看,我的PDB文件必须位于用户计算机上与我的计算机上完全相同的目录中,才能正确找到它.

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 ...在构建时,将PDB放在C:\ PDB \ Mypdb.pdb

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

如果用户创建了确切的文件夹并将pdb放置在该文件夹中,则注入的dll将在崩溃时向他显示行号.但是,如果他将mypdb.pdb与dll或与注入目标一起放置,则它们在符号方面什么也收不到.

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.

关于如何强制我的DLL在可定制的位置使用符号文件的任何想法吗?

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

推荐答案

这是因为默认情况下,链接器使用指向生成PDB文件并将其存储在DLL本身中的位置的绝对路径.您可以通过传递 /PDBALTPATH

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.

这篇关于注入的DLL不能使用Symbols pdb,除非它与build处于同一目录中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆