File gdb-12.1-fix-init-_gdb-module.patch of Package mingw32-gdb
From 2be84df9a7d413dd1ed15861c9810022da6bd8ff Mon Sep 17 00:00:00 2001
From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Sat, 6 Apr 2024 19:53:45 +0200
Subject: [PATCH] gdb: fix initialization of python gdb module when using mingw
---
gdb/python/python.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/python/python.c b/gdb/python/python.c
index 6a978d632e9..ec8901508d0 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -2060,7 +2060,7 @@ do_start_initialization ()
if (PyImport_ExtendInittab (mods) < 0)
return false;
-#ifdef WITH_PYTHON_PATH
+#if defined(__MINGW32__) || defined(WITH_PYTHON_PATH)
/* Work around problem where python gets confused about where it is,
and then can't find its libraries, etc.
NOTE: Python assumes the following layout:
--
2.35.3