Skip to content
This repository has been archived by the owner on Apr 30, 2024. It is now read-only.

Commit

Permalink
For GDB >9 create symlinks with only major version
Browse files Browse the repository at this point in the history
This is based on GDBs new numbering scheme
  • Loading branch information
jonahgraham committed Apr 4, 2021
1 parent 9c99cd1 commit 86cb183
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docker/scripts/download-build-gdb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,14 @@ function symlink_gdb() {
${dryrun} ln -sf "${install_dir}/gdb-${version}/bin/gdb" "${symlinks_dir}/gdb.${short_version}"
${dryrun} ln -sf "${install_dir}/gdb-${version}/bin/gdbserver" "${symlinks_dir}/gdbserver.${short_version}"
fi

# If the version is > 9.x, then make a symlink based on GDB new numbering scheme which is MAJOR.PATCH
local maybe_major_version="${version%.[0-9]}"
local major_version="${maybe_major_version%.[0-9]}"
if (( "$major_version" >= 9 )) ; then
${dryrun} ln -sf "${install_dir}/gdb-${version}/bin/gdb" "${symlinks_dir}/gdb.${major_version}"
${dryrun} ln -sf "${install_dir}/gdb-${version}/bin/gdbserver" "${symlinks_dir}/gdbserver.${major_version}"
fi
}

# Start argument parsing. The script will exit (thanks to errexit) if bad arguments are passed.
Expand Down

0 comments on commit 86cb183

Please sign in to comment.