mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:54:58 +00:00
Toolchain: Move GDB build to a separate script
Target GDB is only used for debugging the kernel, which is not relevant
to most people. Starting with 924758c6f8
, GDB would always be built
as part of the toolchain if the user didn't have it installed. This is
unnecessary.
This commit adds a separate script for building GDB, which the user
needs to explicitly invoke. A message is added to Meta/debug-kernel.sh
which alerts the user to this fact.
This commit is contained in:
parent
550635164d
commit
5ca1bd55a0
3 changed files with 135 additions and 98 deletions
|
@ -9,7 +9,9 @@ fi
|
|||
# Set this environment variable to override the default debugger.
|
||||
#
|
||||
if [ -z "$SERENITY_KERNEL_DEBUGGER" ]; then
|
||||
# Prepend the toolchain bin directory so we pick up GDB from there
|
||||
# Prepend the toolchain's GDB bin directory so we pick up GDB from there
|
||||
PATH="$SCRIPT_DIR/../Toolchain/Local/$SERENITY_ARCH-gdb/bin:$PATH"
|
||||
# GDB used to be installed directly inside the toolchain bin directory
|
||||
PATH="$SCRIPT_DIR/../Toolchain/Local/$SERENITY_ARCH/bin:$PATH"
|
||||
|
||||
if command -v "$SERENITY_ARCH-pc-serenity-gdb" >/dev/null; then
|
||||
|
@ -20,6 +22,9 @@ if [ -z "$SERENITY_KERNEL_DEBUGGER" ]; then
|
|||
SERENITY_KERNEL_DEBUGGER="gdb"
|
||||
else
|
||||
echo "Error: No suitable GDB installation found." >&2
|
||||
echo "Please install $SERENITY_ARCH-elf-gdb or build it with Toolchain/BuildGDB.sh $SERENITY_ARCH" >&2
|
||||
# Prevent tmux from dying instantly by waiting for user input
|
||||
read -rp "Press Enter to exit"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue