简体   繁体   English

如何在代码块的特定win32异常类型上禁用VC ++破坏?

[英]How can I disable VC++ breaking on a specific win32 exception type for a block of code?

I'm embedding the JVM in my C++ application. 我将JVM嵌入C ++应用程序中。 When creating the VM, it generates a SEGV on startup to verify CPU/OS features. 创建VM时, 它会在启动时生成SEGV以验证CPU / OS功能。

This causes my debugger to break on this line of code. 这导致我的调试器在这一行代码上中断。 I know there is a "break when thrown" list and I can disable this exception type, but I still want it to break on legitimate segfaults, just not this one. 我知道有一个“抛出时中断”列表,我可以禁用此异常类型,但是我仍然希望它在合法的段错误时中断,而不是在此段中断时中断。

Is there a pragma or something I can use to tell VC++ to not catch Access Violation s for a line of code? 是否有杂物或我可以用来告诉VC ++不要捕获一行代码的Access Violation的东西? Or is there some other kind of solution to this problem? 还是有其他解决方案?

May be you can use __try {...} __except() statement. 也许您可以使用__try {...} __except()语句。

Please see https://msdn.microsoft.com/en-us/library/s58ftw19.aspx?f=255&MSPPError=-2147217396 请参阅https://msdn.microsoft.com/en-us/library/s58ftw19.aspx?f=255&MSPPError=-2147217396

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM