Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging_fail fail for x64 in VS2013, libglog_static #119

Closed
KevinLucidyne opened this issue Aug 4, 2016 · 1 comment
Closed

logging_fail fail for x64 in VS2013, libglog_static #119

KevinLucidyne opened this issue Aug 4, 2016 · 1 comment

Comments

@KevinLucidyne
Copy link

The following code will fail to compile in logging.cc under VS2013 x64 for libglog_static because _asm is no longer supported.

static void logging_fail() {
#if defined(_DEBUG) && defined(_MSC_VER) 
  // When debugging on windows, avoid the obnoxious dialog and make
  // it possible to continue past a LOG(FATAL) in the debugger
  _asm int 3
#else
  abort();
#endif
}

If I change the code to this, the code will compile but when I use glog and fire a LOG(FAIL) in a debugger I will get the R6010 abort() dialog box.

#if defined(_DEBUG) && defined(_MSC_VER) && defined(_M_IX86)

What is the fix for R6010 that will also work for VS2013 x64?

@Madgeeno
Copy link

Found on this website: http://blog.csdn.net/fksec/article/details/44341531
You may want to replace the inline assembly code:

_asm int 3

with:

__debugbreak();

@sergiud sergiud closed this as completed Mar 30, 2021
@sergiud sergiud mentioned this issue May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants