Skip to content

Commit

Permalink
Toolchain: Update gdb to 11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
BertalanD authored and bgianfo committed Mar 25, 2022
1 parent d13283f commit 5550905
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 32 deletions.
4 changes: 2 additions & 2 deletions Toolchain/BuildIt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ BINUTILS_NAME="binutils-$BINUTILS_VERSION"
BINUTILS_PKG="${BINUTILS_NAME}.tar.gz"
BINUTILS_BASE_URL="https://ftp.gnu.org/gnu/binutils"

GDB_VERSION="10.2"
GDB_MD5SUM="7aeb896762924ae9a2ec59525088bada"
GDB_VERSION="11.2"
GDB_MD5SUM="b5674bef1fbd6beead889f80afa6f269"
GDB_NAME="gdb-$GDB_VERSION"
GDB_PKG="${GDB_NAME}.tar.gz"
GDB_BASE_URL="https://ftp.gnu.org/gnu/gdb"
Expand Down
72 changes: 42 additions & 30 deletions Toolchain/Patches/gdb.patch
Original file line number Diff line number Diff line change
@@ -1,40 +1,52 @@
diff -ur gdb-10.2-orig/bfd/config.bfd gdb-10.2/bfd/config.bfd
--- gdb-10.2-orig/bfd/config.bfd 2021-04-25 07:06:26.000000000 +0300
+++ gdb-10.2/bfd/config.bfd 2021-09-07 01:14:58.781960654 +0300
@@ -224,7 +224,25 @@

case "${targ}" in
# START OF targmatch.h
+ i[3-7]86-*-serenity*)
+ targ_defvec=i386_elf32_vec
From 59d321f27907434ef9a10defd96d58272a963fd9 Mon Sep 17 00:00:00 2001
From: Daniel Bertalan <[email protected]>
Date: Thu, 24 Mar 2022 19:23:23 +0100
Subject: [PATCH] gdb: Add support for SerenityOS

---
bfd/config.bfd | 15 +++++++++++++++
1 file changed, 15 insertions(+)

diff --git a/bfd/config.bfd b/bfd/config.bfd
index 30087e3..58e0b80 100644
--- a/bfd/config.bfd
+++ b/bfd/config.bfd
@@ -255,6 +255,11 @@ case "${targ}" in
targ_selvecs=aarch64_elf64_be_cloudabi_vec
want64=true
;;
+ aarch64-*-serenity*)
+ targ_defvec=aarch64_elf64_le_vec
+ targ_selvecs=
+ want64=true
+ ;;
+ arm-*-serenity*)
+ targ_defvec=arm_elf32_le_vec
aarch64-*-linux* | aarch64-*-netbsd*)
targ_defvec=aarch64_elf64_le_vec
targ_selvecs="aarch64_elf64_be_vec aarch64_elf32_le_vec aarch64_elf32_be_vec arm_elf32_le_vec arm_elf32_be_vec"
@@ -634,6 +639,11 @@ case "${targ}" in
targ_selvecs=
targ64_selvecs=x86_64_elf64_vec
;;
+ i[3-7]86-*-serenity*)
+ targ_defvec=i386_elf32_vec
+ targ_selvecs=
+ targ64_selvecs=x86_64_elf64_vec
+ ;;
#ifdef BFD64
x86_64-*-cloudabi*)
targ_defvec=x86_64_elf64_cloudabi_vec
@@ -694,6 +704,11 @@ case "${targ}" in
targ_selvecs=i386_elf32_vec
want64=true
;;
+ x86_64-*-serenity*)
+ targ_defvec=x86_64_elf64_vec
+ targ_selvecs=i386_elf32_vec
+ want64=true
+ ;;
+ aarch64-*-serenity*)
+ targ_defvec=aarch64_elf64_le_vec
+ targ_selvecs=
+ want64=true
+ ;;
aarch64-*-darwin*)
targ_defvec=aarch64_mach_o_vec
targ_selvecs="arm_mach_o_vec mach_o_le_vec mach_o_be_vec mach_o_fat_vec"
diff -ur gdb-10.2-orig/config.sub gdb-10.2/config.sub
--- gdb-10.2-orig/config.sub 2021-04-25 07:06:26.000000000 +0300
+++ gdb-10.2/config.sub 2021-09-07 01:20:15.360899801 +0300
@@ -1339,6 +1339,7 @@
# Each alternative MUST end in a * to match a version number.
# sysv* is not here because it comes later, after sysvr4.
gnu* | bsd* | mach* | minix* | genix* | ultrix* | irix* \
+ | serenity* \
| *vms* | esix* | aix* | cnk* | sunos | sunos[34]*\
| hpux* | unos* | osf* | luna* | dgux* | auroraux* | solaris* \
| sym* | kopensolaris* | plan9* \
#endif
i[3-7]86-*-lynxos*)
targ_defvec=i386_elf32_vec
--
2.35.1

0 comments on commit 5550905

Please sign in to comment.