是否可以为exe重新生成符号? [英] Is it possible to regenerate symbols for an exe?

查看:53
本文介绍了是否可以为exe重新生成符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的一位同事向客户提供了一个热修复程序版本,随后删除了pdb文件.有问题的构建(崩溃)崩溃了,并且我们有几个崩溃转储.我们在版本控制中拥有所有源代码,并且可以将其编译为等效的.exe并获取该代码的符号.但是,这些符号与崩溃转储不完全匹配.似乎有些功能偏离了一定的偏移量,但我们只看了少数几个.

One of my co-workers shipped a hot fix build to a customer, and subsequently deleted the pdb file. The build in question is crashing (intermittently) and we have a couple of crash dumps. We have all the source code in version control, and can compile it to an equivalent .exe and get symbols for that one. However, those symbols don't match the crash dump exactly. It seems like several of the functions are off by some constant offset, but we've only looked at a handful.

我很希望能够执行以下操作(我可以手动伪造部分内容,但这需要大量工作):获取转储中每个线程的堆栈跟踪并将转储中的指针转换为适当的类型,并使它们显示在Visual Studio调试器中.如果这很重要,我正在使用2005.

I'd love to be able to do the following (I can fake parts of this manually, but it's a huge amount of work): get a stack trace for each thread in the dump and cast pointers in the dump to the appropriate type and have them show up in the Visual Studio debugger. I'm using 2005, if that matters.

是否有一个工具可以让我们在给定源代码,所有.obj文件和原始.exe的情况下重新创建pdb?还是当我们编译/链接时说使它完全像您刚刚做过的另一个exe"或类似的设置?

Is there a tool to let us recreate a pdb given the source code, all the .obj files, and the original .exe? Or is there a setting when we compile/link to say "make it exactly like this other exe you just did" or something like that?

根据到目前为止的答案进行快速更新:如果有帮助,我有发送给客户的exe文件,而不是与之对应的pdb.我会尽快不给他们发送新的构建(如果可能的话),因为要花大约一个星期的时间来获取故障转储,并且客户已经处于为什么还没有解决?"的问题.阶段. (如果我们确实发送了另一个版本,我希望它可以解决问题或在感兴趣的领域进行调试,而不仅仅是相同的代码.)我知道可以使用大量的猜测;这就是我们目前正在做的.但这很痛苦,所以我希望有一种自动化的方法.

Quick update, based on answers so far: I have the exe file that we sent to the customer, just not the pdb that corresponds to it, if that helps. I'd just as soon not send them a new build (if possible), because it takes about a week of running to get the crash dumps, and the customer is already at the "why isn't this already fixed?" stage. (If we do send another build, I'd prefer it to be one that either fixes the problem or has additional debugging in the area of interest, not just the same code.) I know it's possible to do some of this manually with a lot of guesswork; that's what we're currently doing. But it's a pain, so I'm hoping there's a way to automate it.

推荐答案

如果您的构建系统使您能够从历史记录中的任何修订版本中重新创建任何二进制文件,那么您应该能够从客户那里获得构建ID,并重新生成相同的确切版本ID,以及所有二进制文件等等.当然,如果您的项目很大,那会花一些时间,但是也会产生所需的调试文件.

If your build system enables you to recreate any binary from any revision you have in your history, then you should be able to get the build ID from the customer, and regenerate that same exact build ID, along with all the binaries and so forth. That will take a while if you have a large project, of course, but it will also yield the debugging file that you need.

如果您无法精确地复制构建,请查看这种情况,仔细考虑可能会出现的其他问题,然后开始着手重新生成所有成功的构建和相关文件.项目的历史.这样将来可以更轻松地解决此类问题.

If you have no way to perform an exact reproduction of a build, then look at this situation, think hard about some others that might crop up, and start moving to make it possible to regenerate all successful builds and associated files in the project's history. This will make it much easier to be able to work problems like this in the future.

这篇关于是否可以为exe重新生成符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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