1.1 --- a/config/debug/gdb.in Thu Oct 11 14:39:42 2012 +1000
1.2 +++ b/config/debug/gdb.in Thu Oct 11 14:39:42 2012 +1000
1.3 @@ -119,6 +119,13 @@
1.4 bool
1.5 prompt "6.8a"
1.6
1.7 +config GDB_CUSTOM
1.8 + bool
1.9 + prompt "Custom gdb"
1.10 + depends on EXPERIMENTAL
1.11 + select GDB_7_0_or_later
1.12 + select GDB_7_2_or_later
1.13 +
1.14 endchoice
1.15
1.16 config GDB_7_2_or_later
1.17 @@ -152,5 +159,19 @@
1.18 default "7.0.1a" if GDB_V_7_0_1a
1.19 default "7.0a" if GDB_V_7_0a
1.20 default "6.8a" if GDB_V_6_8a
1.21 + default "custom" if GDB_CUSTOM
1.22 +
1.23 +if GDB_CUSTOM
1.24 +
1.25 +config GDB_CUSTOM_LOCATION
1.26 + string
1.27 + prompt "Full path to custom gdb source"
1.28 + default ""
1.29 + help
1.30 + Enter the path to the directory (or tarball) of your source for gdb,
1.31 + or leave blank to use default CT_CUSTOM_LOCATION_ROOT_DIR/gdb
1.32 +
1.33 +endif # GDB_CUSTOM
1.34
1.35 endif
1.36 +
2.1 --- a/scripts/build/debug/300-gdb.sh Thu Oct 11 14:39:42 2012 +1000
2.2 +++ b/scripts/build/debug/300-gdb.sh Thu Oct 11 14:39:42 2012 +1000
2.3 @@ -48,10 +48,14 @@
2.4 do_debug_gdb_parts
2.5
2.6 if [ "${do_gdb}" = "y" ]; then
2.7 - CT_GetFile "gdb-${CT_GDB_VERSION}" \
2.8 - {ftp,http}://ftp.gnu.org/pub/gnu/gdb \
2.9 - ftp://sources.redhat.com/pub/gdb/{,old-}releases \
2.10 - "${linaro_base_url}/${linaro_series}/${linaro_version}/+download"
2.11 + if [ "${CT_GDB_CUSTOM}" = "y" ]; then
2.12 + CT_GetCustom "gdb" "${CT_GDB_VERSION}" "${CT_GDB_CUSTOM_LOCATION}"
2.13 + else
2.14 + CT_GetFile "gdb-${CT_GDB_VERSION}" \
2.15 + {ftp,http}://ftp.gnu.org/pub/gnu/gdb \
2.16 + ftp://sources.redhat.com/pub/gdb/{,old-}releases \
2.17 + "${linaro_base_url}/${linaro_series}/${linaro_version}/+download"
2.18 + fi
2.19 fi
2.20
2.21 if [ "${do_ncurses}" = "y" ]; then
2.22 @@ -70,6 +74,11 @@
2.23 do_debug_gdb_parts
2.24
2.25 if [ "${do_gdb}" = "y" ]; then
2.26 + # If using custom directory location, nothing to do
2.27 + if [ "${CT_GDB_CUSTOM}" = "y" \
2.28 + -a -d "${CT_SRC_DIR}/gdb-${CT_GDB_VERSION}" ]; then
2.29 + return 0
2.30 + fi
2.31 CT_Extract "gdb-${CT_GDB_VERSION}"
2.32 CT_Patch "gdb" "${CT_GDB_VERSION}"
2.33 fi