* [pushed] [gdb/python] Only include gdbsupport/selftest.h if GDB_SELF_TEST
@ 2023-10-23 16:25 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-10-23 16:25 UTC (permalink / raw)
To: gdb-patches
I noticed that gdb/python/python.c unconditionally includes
gdbsupport/selftest.h.
Make this conditional on GDB_SELF_TEST.
Tested on x86_64-linux.
---
gdb/python/python.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gdb/python/python.c b/gdb/python/python.c
index d3dea088c3b..d569fb5a3e4 100644
--- a/gdb/python/python.c
+++ b/gdb/python/python.c
@@ -35,9 +35,12 @@
#include <ctype.h>
#include "location.h"
#include "run-on-main-thread.h"
-#include "gdbsupport/selftest.h"
#include "observable.h"
+#if GDB_SELF_TEST
+#include "gdbsupport/selftest.h"
+#endif
+
/* Declared constants and enum for python stack printing. */
static const char python_excp_none[] = "none";
static const char python_excp_full[] = "full";
base-commit: a0094f1a70e1d5a7a8124e7c988fc1ddd1886f19
--
2.35.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-10-23 16:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-23 16:25 [pushed] [gdb/python] Only include gdbsupport/selftest.h if GDB_SELF_TEST Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).