Skip to content

Commit

Permalink
Bug 1135201: Use most-recent available gdb
Browse files Browse the repository at this point in the history
Older versions of gdb don't support certain features, such as new
versions of the DWARF format in this case. Changing the prefered
gdb version to the most recent one ensures that we support as many
features as possible.
  • Loading branch information
tdz committed Feb 23, 2015
1 parent 55afe11 commit 545e066
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions run-gdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ esac
HOST_OS=$(uname -s | tr "[[:upper:]]" "[[:lower:]]")-x86

if [ -z "${GDB}" ]; then
if [ -d prebuilt ]; then
GDB=prebuilt/${HOST_OS}/toolchain/${TARGET_TRIPLE}-4.4.x/bin/${TARGET_TRIPLE}-gdb
elif [ -d prebuilts ]; then
if [ -d prebuilts ]; then
GDB=prebuilts/gcc/${HOST_OS}/${TARGET_ARCH}/${TARGET_TRIPLE}-4.8/bin/${TARGET_TRIPLE}-gdb
# If new version doesn't exist fallback to old version.
[ -f "${GDB}" ] || GDB=prebuilts/gcc/${HOST_OS}/${TARGET_ARCH}/${TARGET_TRIPLE}-4.7/bin/${TARGET_TRIPLE}-gdb
Expand All @@ -39,6 +37,8 @@ if [ -z "${GDB}" ]; then
if [ -d $PYTHON_DIR ]; then
export PYTHONHOME=$PYTHON_DIR
fi
elif [ -d prebuilt ]; then
GDB=prebuilt/${HOST_OS}/toolchain/${TARGET_TRIPLE}-4.4.x/bin/${TARGET_TRIPLE}-gdb
else
echo "Not sure where gdb is located. Override using GDB= or fix the script."
exit 1
Expand Down

0 comments on commit 545e066

Please sign in to comment.