This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Python not optional?


I always assumed that the Python scripting support would be optional.
I think that's what we agreed on when the idea to use Python as a
scripting language was first circulated.  So I was a bit disappointed
when GDB no longer built on my systems.  Luckily this isn't too
difficult to fix; the attached rough diff does the job, but might need
a bit of cleanup.


Index: cli/cli-script.c
===================================================================
RCS file: /cvs/src/src/gdb/cli/cli-script.c,v
retrieving revision 1.47
diff -u -p -r1.47 cli-script.c
--- cli/cli-script.c	16 Aug 2008 20:36:29 -0000	1.47
+++ cli/cli-script.c	20 Aug 2008 14:24:40 -0000
@@ -34,7 +34,9 @@
 #include "cli/cli-script.h"
 #include "gdb_assert.h"
 
+#ifdef HAVE_PYTHON
 #include "python/python.h"
+#endif
 
 /* Prototypes for local functions */
 
@@ -543,12 +545,14 @@ execute_control_command (struct command_
 	ret = commands_from_control_command (new_line, cmd);
 	break;
       }
+#ifdef HAVE_PYTHON
     case python_control:
       {
 	eval_python_from_control_command (cmd);
 	ret = simple_control;
 	break;
       }
+#endif
 
     default:
       warning (_("Invalid control type in canned commands structure."));


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]