mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 05:17:34 +00:00
Meta: Make serenity.sh gdb
work with the Clang toolchain
We now pass along the toolchain type to all subcommands. This ensures that gdb will load the correct debug information for kernels compiled with Clang, and the following warning won't appear with the GNU toolchain: > WARNING: unknown toolchain 'gdb'. Defaulting to GNU. > Valid values are 'Clang', 'GNU' (default)
This commit is contained in:
parent
0787571192
commit
0f2e18403c
2 changed files with 10 additions and 4 deletions
|
@ -185,6 +185,7 @@ cmd_with_target() {
|
|||
BUILD_DIR="$SERENITY_SOURCE_DIR/Build/$TARGET$TARGET_TOOLCHAIN"
|
||||
if [ "$TARGET" != "lagom" ]; then
|
||||
export SERENITY_ARCH="$TARGET"
|
||||
export SERENITY_TOOLCHAIN="$TOOLCHAIN_TYPE"
|
||||
if [ "$TOOLCHAIN_TYPE" = "Clang" ]; then
|
||||
TOOLCHAIN_DIR="$SERENITY_SOURCE_DIR/Toolchain/Local/clang"
|
||||
else
|
||||
|
@ -376,7 +377,7 @@ if [[ "$CMD" =~ ^(build|install|image|copy-src|run|gdb|test|rebuild|recreate|kad
|
|||
build_target
|
||||
build_target install
|
||||
build_image
|
||||
tmux new-session "$ARG0" __tmux_cmd "$TARGET" run "${CMD_ARGS[@]}" \; set-option -t 0 mouse on \; split-window "$ARG0" __tmux_cmd "$TARGET" gdb "${CMD_ARGS[@]}" \;
|
||||
tmux new-session "$ARG0" __tmux_cmd "$TARGET" "$TOOLCHAIN_TYPE" run "${CMD_ARGS[@]}" \; set-option -t 0 mouse on \; split-window "$ARG0" __tmux_cmd "$TARGET" "$TOOLCHAIN_TYPE" gdb "${CMD_ARGS[@]}" \;
|
||||
fi
|
||||
;;
|
||||
test)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue