summaryrefslogtreecommitdiff
path: root/LinBPQ.c
diff options
context:
space:
mode:
authorDave Hibberd <hibby@debian.org>2026-10-20 22:17:44 +0100
committerDave Hibberd <hibby@debian.org>2026-10-20 22:17:44 +0100
commitc1e2370509e9f78357c3a74aac3babcfd88343b4 (patch)
treea73fe6e590a6dbdd8d595cb0622c6ae16666a3b5 /LinBPQ.c
parent6c91842feefcdd0684f7008c6e5402071541794e (diff)
parentea93adeffbb191c502e9b27be4e7a4c8cdd332a5 (diff)
Update upstream source from tag 'upstream/6.0.26.1+repack'
Update to upstream version '6.0.26.1+repack' with Debian dir 40bbe79cb2c498826b4c6fd8726fdfe00e8d0cc4
Diffstat (limited to 'LinBPQ.c')
-rw-r--r--LinBPQ.c52
1 files changed, 38 insertions, 14 deletions
diff --git a/LinBPQ.c b/LinBPQ.c
index 8515119..bfee707 100644
--- a/LinBPQ.c
+++ b/LinBPQ.c
@@ -1169,6 +1169,7 @@ LONG WINAPI UnhandledExcepFilter(PEXCEPTION_POINTERS pExcepPointers)
DWORD dwDisplacement;
IMAGEHLP_LINE64 line;
char * fptr;
+ DWORD ExceptionCode = pExcepPointers->ExceptionRecord->ExceptionCode;
time_t T;
@@ -1190,29 +1191,52 @@ LONG WINAPI UnhandledExcepFilter(PEXCEPTION_POINTERS pExcepPointers)
exit(0);
}
+
+ switch (ExceptionCode)
+ {
- inErrorhandling = 1;
-
- if(pExcepPointers->ExceptionRecord->ExceptionCode == DBG_PRINTEXCEPTION_C)
+ case DBG_PRINTEXCEPTION_C:
return EXCEPTION_CONTINUE_EXECUTION;
- SymFromAddr( process, ((DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress), 0, symbol );
+ case STATUS_INTEGER_DIVIDE_BY_ZERO:
+ case STATUS_ACCESS_VIOLATION:
+ case STATUS_STACK_OVERFLOW:
+ case STATUS_FLOAT_DIVIDE_BY_ZERO:
- Debugprintf("\r\n\r\nProgram error trapped at %02d:%02d:%02d\r\n", tm->tm_hour, tm->tm_min, tm->tm_sec);
+ break;
- SymGetLineFromAddr64(process, (DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress, &dwDisplacement, &line);
+ // ignore others
- if (line.FileName)
- {
- fptr = line.FileName + (int)strlen(line.FileName); // remove path
- while (*fptr != '\\' && *fptr != '/')
- fptr--;
-
- fptr++;
+ default:
- Debugprintf("In Procedure %s - %s Line %d Addr %p\r\n", symbol->Name, fptr, line.LineNumber, symbol->Address );
+ return EXCEPTION_CONTINUE_SEARCH;
}
+ inErrorhandling = 1;
+
+ SymFromAddr( process, ((DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress), 0, symbol );
+
+ Debugprintf("\r\n\r\nProgram error trapped at %02d:%02d:%02d\r\n", tm->tm_hour, tm->tm_min, tm->tm_sec);
+
+ if (SymFromAddr(process, ((DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress), 0, symbol))
+ {
+ Debugprintf("\r\n\r\nException %x trapped at %02d:%02d:%02d\r\n", ExceptionCode, tm->tm_hour, tm->tm_min, tm->tm_sec);
+
+ line.SizeOfStruct = sizeof(IMAGEHLP_LINE64);
+
+ SymGetLineFromAddr64(process, (DWORD)pExcepPointers->ExceptionRecord->ExceptionAddress, &dwDisplacement, &line);
+
+ if (line.FileName)
+ {
+ fptr = line.FileName + (int)strlen(line.FileName); // remove path
+ while (*fptr != '\\' && *fptr != '/')
+ fptr--;
+
+ fptr++;
+
+ Debugprintf("In Procedure %s - %s Line %d Addr %p\r\n", symbol->Name, fptr, line.LineNumber, symbol->Address );
+ }
+ }
printStack();
CloseDebugLog();