summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-04-09 13:23:24 +0200
committerLinus Groh <mail@linusgroh.de>2023-04-09 16:51:11 +0200
commit83701ec54b12af141ce10e910604c9e130f16f76 (patch)
tree4598e76ebd62306d32163603d055c043ef218346
parent022a55e8251780774b9bda94e289ad19f4b6e7e1 (diff)
downloadserenity-83701ec54b12af141ce10e910604c9e130f16f76.zip
Meta+Toolchain: Redirect GDB error output to stdout before grepping
-rwxr-xr-xMeta/debug-kernel.sh2
-rwxr-xr-xToolchain/BuildIt.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/Meta/debug-kernel.sh b/Meta/debug-kernel.sh
index 506ea79dfc..04afa992b0 100755
--- a/Meta/debug-kernel.sh
+++ b/Meta/debug-kernel.sh
@@ -16,7 +16,7 @@ if [ -z "$SERENITY_KERNEL_DEBUGGER" ]; then
SERENITY_KERNEL_DEBUGGER="$SERENITY_ARCH-pc-serenity-gdb"
elif command -v "$SERENITY_ARCH-elf-gdb" >/dev/null; then
SERENITY_KERNEL_DEBUGGER="$SERENITY_ARCH-elf-gdb"
- elif command -v gdb >/dev/null && gdb -ex 'set architecture' -ex 'quit' | grep "${SERENITY_ARCH//_/-}"; then
+ elif command -v gdb >/dev/null && gdb -ex 'set architecture' -ex 'quit' 2>&1 | grep "${SERENITY_ARCH//_/-}"; then
SERENITY_KERNEL_DEBUGGER="gdb"
else
echo "Error: No suitable GDB installation found." >&2
diff --git a/Toolchain/BuildIt.sh b/Toolchain/BuildIt.sh
index 16ea39befe..777f2685e2 100755
--- a/Toolchain/BuildIt.sh
+++ b/Toolchain/BuildIt.sh
@@ -103,7 +103,7 @@ buildstep() {
has_gdb() {
ARCH=$1
ARCH_DASH="${ARCH//_/-}"
- if command -v gdb >/dev/null && gdb -ex 'set architecture' -ex 'quit' | grep "$ARCH_DASH"; then
+ if command -v gdb >/dev/null && gdb -ex 'set architecture' -ex 'quit' 2>&1 | grep "$ARCH_DASH"; then
return 0
else
command -v "$ARCH"-elf-gdb >/dev/null