diff --git a/config/debug/gdb.in.cross b/config/debug/gdb.in.cross --- a/config/debug/gdb.in.cross +++ b/config/debug/gdb.in.cross @@ -24,4 +24,28 @@ That way, you can share the cross-gdb without installing a toolchain on every machine that will be used to debug target programs. +config GDB_CROSS_PYTHON + bool + prompt "Enable python scripting" + default n + help + If you say 'y' here, then you will be able to call to python from the + gdb prompt. + +config GDB_CROSS_PYTHON_PATH + string + prompt "Path to python" + default "" + depends on GDB_CROSS_PYTHON + help + By default, gdb's ./configure will search $PATH to find python, and + deduce the python headers and libs. + + If your python is not in the standard places, you can enter here any of: + - the full path to the python executable + - the prefix you gave when you ./configured python + - just the name of the python executable + + If you are not sure, just leave this empty. + endif # GDB_CROSS diff --git a/scripts/build/debug/300-gdb.sh b/scripts/build/debug/300-gdb.sh --- a/scripts/build/debug/300-gdb.sh +++ b/scripts/build/debug/300-gdb.sh @@ -112,6 +112,9 @@ none) cross_extra_config+=("--disable-threads");; *) cross_extra_config+=("--enable-threads");; esac + if [ "${CT_GDB_CROSS_PYTHON}" = "y" ]; then + cross_extra_config+=("--with-python=${CT_GDB_CROSS_PYTHON_PATH}") + fi CC_for_gdb= LD_for_gdb=