Fix ebacktrace on 64-bit. New DLLs all around.

git-svn-id: https://svn.eduke32.com/eduke32@4470 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2014-05-17 12:35:46 +00:00
parent fe4e93fa1b
commit 5f3921fa93
4 changed files with 4 additions and 4 deletions

View file

@ -435,7 +435,7 @@ endif
$(EBACKTRACEDLL): platform/Windows/src/backtrace.c $(EBACKTRACEDLL): platform/Windows/src/backtrace.c
$(COMPILE_STATUS) $(COMPILE_STATUS)
if $(CC) $(OURCONLYFLAGS) -O2 -shared -Wall -Wextra -static-libgcc -I$(EINC) -o $@ $^ -lbfd -liberty -limagehlp; then $(COMPILE_OK); else $(COMPILE_FAILED); fi if $(CC) $(OURCONLYFLAGS) -O2 -ggdb -shared -Wall -Wextra -static-libgcc -I$(EINC) -o $@ $^ -lbfd -liberty -limagehlp; then $(COMPILE_OK); else $(COMPILE_FAILED); fi
$(OBJ)/%.$o: $(SRC)/%.nasm $(OBJ)/%.$o: $(SRC)/%.nasm
$(COMPILE_STATUS) $(COMPILE_STATUS)

View file

@ -348,7 +348,7 @@ _backtrace(struct output_buffer *ob, struct bfd_set *set, int depth , LPCONTEXT
} }
static char * g_output = NULL; static char * g_output = NULL;
static LPTOP_LEVEL_EXCEPTION_FILTER g_prev = NULL; static PVOID g_prev = NULL;
static LONG WINAPI static LONG WINAPI
exception_filter(LPEXCEPTION_POINTERS info) exception_filter(LPEXCEPTION_POINTERS info)
@ -403,7 +403,7 @@ backtrace_register(void)
{ {
if (g_output == NULL) { if (g_output == NULL) {
g_output = malloc(BUFFER_MAX); g_output = malloc(BUFFER_MAX);
g_prev = SetUnhandledExceptionFilter(exception_filter); g_prev = AddVectoredExceptionHandler(1, exception_filter);
} }
} }
@ -412,7 +412,7 @@ backtrace_unregister(void)
{ {
if (g_output) { if (g_output) {
free(g_output); free(g_output);
SetUnhandledExceptionFilter(g_prev); RemoveVectoredExceptionHandler(g_prev);
g_prev = NULL; g_prev = NULL;
g_output = NULL; g_output = NULL;
} }