mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:07:36 +00:00
Meta+Toolchain: Redirect GDB error output to stdout before grepping
This commit is contained in:
parent
022a55e825
commit
83701ec54b
2 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ if [ -z "$SERENITY_KERNEL_DEBUGGER" ]; then
|
||||||
SERENITY_KERNEL_DEBUGGER="$SERENITY_ARCH-pc-serenity-gdb"
|
SERENITY_KERNEL_DEBUGGER="$SERENITY_ARCH-pc-serenity-gdb"
|
||||||
elif command -v "$SERENITY_ARCH-elf-gdb" >/dev/null; then
|
elif command -v "$SERENITY_ARCH-elf-gdb" >/dev/null; then
|
||||||
SERENITY_KERNEL_DEBUGGER="$SERENITY_ARCH-elf-gdb"
|
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"
|
SERENITY_KERNEL_DEBUGGER="gdb"
|
||||||
else
|
else
|
||||||
echo "Error: No suitable GDB installation found." >&2
|
echo "Error: No suitable GDB installation found." >&2
|
||||||
|
|
|
@ -103,7 +103,7 @@ buildstep() {
|
||||||
has_gdb() {
|
has_gdb() {
|
||||||
ARCH=$1
|
ARCH=$1
|
||||||
ARCH_DASH="${ARCH//_/-}"
|
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
|
return 0
|
||||||
else
|
else
|
||||||
command -v "$ARCH"-elf-gdb >/dev/null
|
command -v "$ARCH"-elf-gdb >/dev/null
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue