Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

otp: move gdb-tools outside of erlang/otp repo #9178

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions make/gdb_tools_link
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2024 Ericsson and the Erlang/OTP contributors
https://github.com/erlang/otp-gdb-tools
2 changes: 2 additions & 0 deletions make/gdb_tools_vsn
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2024 Ericsson and the Erlang/OTP contributors
7b864f58c534699e4124e31ecfda86041b941037
18 changes: 7 additions & 11 deletions otp_build
Original file line number Diff line number Diff line change
Expand Up @@ -1061,10 +1061,10 @@ do_download_gdb_tools ()
set_common_vars() {
GDB_TOOLS_INSTALL_PATH="$ERL_TOP/erts/etc/unix/gdb-tools"
GDB_TOOLS_VSN_PATH="$ERL_TOP/make"
GDB_REPO=$(cat "$GDB_TOOLS_VSN_PATH/gdb_tools_link")
GDB_REPO=$(cat "$GDB_TOOLS_VSN_PATH/gdb_tools_link" | tail -n1)

# Version of gdb-tools to download
GDB_TOOLS_VSN=$(cat "$GDB_TOOLS_VSN_PATH/gdb_tools_vsn")
GDB_TOOLS_VSN=$(cat "$GDB_TOOLS_VSN_PATH/gdb_tools_vsn" | tail -n1)

# SHASUM_FORMAT has values: sha256sum, sha1sum, shasum
SHASUM_FORMAT=
Expand Down Expand Up @@ -1119,7 +1119,11 @@ do_update_gdb_tools ()
cd "$GDB_TOOLS_INSTALL_PATH" && \
git fetch $GDB_REPO && \
GDB_TOOLS_VSN=$(git log gdb_tools/master --oneline --no-abbrev-commit -n1 | cut -d" " -f1) && \
echo "$GDB_TOOLS_VSN" > "$ERL_TOP/make/gdb_tools_vsn"
cat <<EOF > "$ERL_TOP/make/gdb_tools_vsn"
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: 2024 Ericsson and the Erlang/OTP contributors
$GDB_TOOLS_VSN
EOF
else
echo "Please, download gdb_tools invoking the command: \`otp_build download_gdb_tools\`"
exit 1
Expand All @@ -1145,14 +1149,6 @@ do_update_gdb_tools ()
echo "Run \`otp_build download_gdb_tools\` to complete the installation of the update"
}

# $1: jit-reader.c, jit-reader.h, etc
# $2: DGB_TOOLS_VSN, e.g., maint-28, foo, etc it is guaranteed to be an existing branch
# that lives in "$ERL_TOP/make/$1.$SHASUM_FORMAT"
create_shasum_file() {
cat "$GDB_TOOLS_INSTALL_PATH/$1.$SHASUM_FORMAT" > "$GDB_TOOLS_VSN_PATH/$1.$SHASUM_FORMAT"
echo "$GDB_TOOLS_VSN" > "$ERL_TOP/make/gdb_tools_vsn"
}

choose_available_shasum ()
{
if command -v sha256sum > /dev/null; then
Expand Down
Loading