1.1 --- a/config/debug/gdb.in.cross Sun Oct 09 15:34:16 2011 +0200
1.2 +++ b/config/debug/gdb.in.cross Sat Oct 08 22:57:21 2011 +0200
1.3 @@ -33,4 +33,20 @@
1.4 That way, you can share the cross-gdb without installing a toolchain
1.5 on every machine that will be used to debug target programs.
1.6
1.7 +config GDB_CROSS_PYTHON
1.8 + bool
1.9 + prompt "Enable python scripting"
1.10 + depends on CONFIGURE_has_python
1.11 + depends on ! GDB_CROSS_STATIC
1.12 + default y
1.13 + help
1.14 + Say 'y' if you want to use Python scripting inside gdb.
1.15 + Say 'n' if you do not want to.
1.16 +
1.17 + Beware that enabling Python scripting could render the gdb
1.18 + executable non-functional if you move it to another machine.
1.19 + Building a static gdb can help in this regard, although there
1.20 + have been reports of problems when linking gdb to the static
1.21 + libpython.a. This should be fixed in gdb >=7.3. YMMV.
1.22 +
1.23 endif # GDB_CROSS
2.1 --- a/configure Sun Oct 09 15:34:16 2011 +0200
2.2 +++ b/configure Sat Oct 08 22:57:21 2011 +0200
2.3 @@ -609,6 +609,7 @@
2.4 has_or_warn inc="${python_incs}" \
2.5 lib="${python_libs}" \
2.6 lib_exts="${libs_exts}" \
2.7 + kconfig=has_python \
2.8 err="The 'python' header file and library are needed for some features of cross-gdb"
2.9
2.10 #---------------------------------------------------------------------
3.1 --- a/scripts/build/debug/300-gdb.sh Sun Oct 09 15:34:16 2011 +0200
3.2 +++ b/scripts/build/debug/300-gdb.sh Sat Oct 08 22:57:21 2011 +0200
3.3 @@ -118,6 +118,11 @@
3.4 none) cross_extra_config+=("--disable-threads");;
3.5 *) cross_extra_config+=("--enable-threads");;
3.6 esac
3.7 + if [ "${CT_GDB_CROSS_PYTHON}" = "y" ]; then
3.8 + cross_extra_config+=( "--with-python=yes" )
3.9 + else
3.10 + cross_extra_config+=( "--with-python=no" )
3.11 + fi
3.12
3.13 CC_for_gdb=
3.14 LD_for_gdb=