debian/patches: Add 1001_keep-symbol-DumpThreadHandles-if-debugging-is-disabled.patch. Keep DumpThreadHandles as a symbol even if WITH_DEBUG_THREADS is OFF.

(cherry picked from commit f726052dd4)
This commit is contained in:
Mike Gabriel 2022-03-08 08:25:06 +01:00
parent 4db4aa6d33
commit 03201de47f
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,38 @@
Description: Keep DumpThreadHandles as a symbol even if WITH_DEBUG_THREADS is OFF.
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Forwarded: https://github.com/FreeRDP/FreeRDP/pull/7708
--- a/winpr/libwinpr/thread/thread.c
+++ b/winpr/libwinpr/thread/thread.c
@@ -783,9 +783,9 @@
return TRUE;
}
-#if defined(WITH_DEBUG_THREADS)
VOID DumpThreadHandles(void)
{
+#if defined(WITH_DEBUG_THREADS)
char** msg;
size_t used, i;
void* stack = winpr_backtrace(20);
@@ -846,6 +846,6 @@
}
WLog_DBG(TAG, "---------------- End Dumping thread handles -------------");
-}
#endif
+}
#endif
--- a/winpr/include/winpr/thread.h
+++ b/winpr/include/winpr/thread.h
@@ -248,10 +248,7 @@
/* CommandLineToArgvA is not present in the original Windows API, WinPR always exports it */
WINPR_API LPSTR* CommandLineToArgvA(LPCSTR lpCmdLine, int* pNumArgs);
-
-#if defined(WITH_DEBUG_THREADS)
WINPR_API VOID DumpThreadHandles(void);
-#endif
#ifdef __cplusplus
}

View File

@ -22,3 +22,4 @@
0033-Reverted-winpr_BinToHexString-argument-change.patch
0034-Fixed-6938-Remote-app-mode-clipboard-fix.patch
0035-Fixed-6989-Use-X509_STORE_set_default_paths.patch
1001_keep-symbol-DumpThreadHandles-if-debugging-is-disabled.patch