admin管理员组文章数量:1356444
I have a function IsPtrReadable
which uses SEH to check for invalid pointers.
bool DXHR::IsPtrReadable(void* pointer) {
__try {
volatile char test = *(char*)pointer;
return true;
}
__except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) {
return false;
}
}
I'm expecting IsPtrReadable
to come across nullptr
and invalid pointers eventually. Which is why I have it inside of an SEH block. The issue is that when debugging my application MSVC will halt execution every time this occurs. Which is a nuisance because I'm not interested in when it happens within this specific function. But I'd like it to still halt and show me the line an access violation occurs on outside of this function.
How can I achieve this?
本文标签: cMSVC39s debugger continuously halts execution for SEHStack Overflow
版权声明:本文标题:c++ - MSVC's debugger continuously halts execution for SEH - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743972805a2570757.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论