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
|
||||
endif
|
||||
|
||||
# enable basic run-time checks in non-optimized build
|
||||
ifeq ($(OPTIMIZE),0)
|
||||
CCOMFLAGS += /RTC1
|
||||
endif
|
||||
|
||||
# enable exception handling for C++
|
||||
CPPONLYFLAGS += /EHsc
|
||||
|
||||
|
@ -1174,6 +1174,9 @@ static LONG WINAPI exception_filter(struct _EXCEPTION_POINTERS *info)
|
||||
// walk the stack
|
||||
while (walker.unwind())
|
||||
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
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
|
Loading…
Reference in New Issue
Block a user