简体   繁体   中英

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. When creating the VM, it generates a SEGV on startup to verify CPU/OS features.

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? Or is there some other kind of solution to this problem?

May be you can use __try {...} __except() statement.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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