VC调试中的mapInfo不支持line numbers的解决方案

原文是这样的,某个人在vs2012中想要输出map文件,但是发现map文件输出选项中的/MAPINFO:LINES 报错,从而去寻求帮助。官方给的答复是,改命令在vs2005之后就不支持了,建议换成minidump的方式。

原文如下:

Visual Studio 2012:error LNK1117: syntax error in option 'MAPINFO:LINES'


Hi,

Thanks for posting here.

According to your descrition, you want to turn on MAPINFO:LINES in the visual studio 2012. As far as I know, /MAPINFO:LINES is no longer supported since VS2005.

If you need to use it, you may have a try to find a replacement of it. You can refer to the link below and consider using dbghelp library to do this.

replacement for /mapinofo:lines in Visual Studio 2005

By the way, here is an article describes how minidumps work, how to make your application create them when it crashes, and how to read them back with Visual Studio .NET. It should be helpful for you.

http://www.codeproject.com/Articles/1934/Post-Mortem-Debugging-Your-Application-with-Minidu

Best Regards,

May

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.

    Marked as answer by May Wang - MSFTMicrosoft contingent staff Tuesday, September 09, 2014 9:40 AM

Monday, September 01, 2014 3:13 AM
Andy,

I would suggest looking at MiniDumpWriteDump() from dbghelp.dll. You can use this to capture the information you're looking for, and then examine minidumps with cdb, ntsd, windbg, or Visual Studio.

A quick sketch of what you want to do is as follows - declare your exception filter function to take LPEXCEPTION_POINTERS, and pass GetExceptionInformation() to it, e.g.:
int MyFilter(LPEXCEPTION_POINTERS lpEP) {...}
__try { ... } __except(MyFilter(GetExceptionPointers())) { ... }

then in MyFilter() you can call a function that uses MiniDumpWriteDump() to write a minidump file that your user's can give to you when they see a failure.

You can then use one of the debuggers with the .pdb for the application to generate a call stack.

Hope this helps.

Mark Lacey
VC++ Development Team
Tuesday, November 29, 2005 9:17 PM

Post-Mortem Debugging Your Application with Minidumps and Visual Studio .NET



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值