Enable Visual Studio basic run-time checks in non-optimized builds [Oliver Stoneberg]
Flush stderr, so the data is actually written when output is being redirected [Oliver Stoneberg]
This commit is contained in:
parent
188921974e
commit
9cf16652c7
@ -140,6 +140,11 @@ CCOMFLAGS += /wd4267
|
|||||||
#LIBS += -lbufferoverflowu
|
#LIBS += -lbufferoverflowu
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# enable basic run-time checks in non-optimized build
|
||||||
|
ifeq ($(OPTIMIZE),0)
|
||||||
|
CCOMFLAGS += /RTC1
|
||||||
|
endif
|
||||||
|
|
||||||
# enable exception handling for C++
|
# enable exception handling for C++
|
||||||
CPPONLYFLAGS += /EHsc
|
CPPONLYFLAGS += /EHsc
|
||||||
|
|
||||||
|
@ -1175,6 +1175,9 @@ static LONG WINAPI exception_filter(struct _EXCEPTION_POINTERS *info)
|
|||||||
while (walker.unwind())
|
while (walker.unwind())
|
||||||
fprintf(stderr, " %p: %p%s\n", (void *)walker.frame(), (void *)walker.ip(), (symbols == NULL) ? "" : symbols->symbol_for_address(walker.ip()));
|
fprintf(stderr, " %p: %p%s\n", (void *)walker.frame(), (void *)walker.ip(), (symbols == NULL) ? "" : symbols->symbol_for_address(walker.ip()));
|
||||||
|
|
||||||
|
// flush stderr, so the data is actually written when output is being redirected
|
||||||
|
fflush(stderr);
|
||||||
|
|
||||||
// exit
|
// exit
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
return EXCEPTION_CONTINUE_SEARCH;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user