diff --git a/gdb-aarch64-fix-erroneous-use-of-spu-architecture-bfd.patch b/gdb-aarch64-fix-erroneous-use-of-spu-architecture-bfd.patch new file mode 100644 index 0000000..1d2ff1b --- /dev/null +++ b/gdb-aarch64-fix-erroneous-use-of-spu-architecture-bfd.patch @@ -0,0 +1,34 @@ +[AArch64] Fix erroneous use of spu architecture bfd + +While investigating some SVE code, i noticed the use of two spu bfd variables. + +This looks like an oversight, as the "id" field is available for non-spu +architectures as well, even though its primary use was the Cell BE +architecture. + +gdb/ChangeLog: + +2020-01-05 Luis Machado + + * aarch64-linux-nat.c + (aarch64_linux_nat_target::thread_architecture): Use bfd_arch_aarch64 + and bfd_mach_aarch64. + +--- + gdb/ChangeLog | 6 ++++++ + gdb/aarch64-linux-nat.c | 2 +- + 2 files changed, 7 insertions(+), 1 deletion(-) + +diff --git a/gdb/aarch64-linux-nat.c b/gdb/aarch64-linux-nat.c +index 62f5cdb1fc..4e712ebfb7 100644 +--- a/gdb/aarch64-linux-nat.c ++++ b/gdb/aarch64-linux-nat.c +@@ -970,7 +970,7 @@ aarch64_linux_nat_target::thread_architecture (ptid_t ptid) + unavailable, to distinguish from an unset value of 0. */ + struct gdbarch_info info; + gdbarch_info_init (&info); +- info.bfd_arch_info = bfd_lookup_arch (bfd_arch_spu, bfd_mach_spu); ++ info.bfd_arch_info = bfd_lookup_arch (bfd_arch_aarch64, bfd_mach_aarch64); + info.id = (int *) (vq == 0 ? -1 : vq); + return gdbarch_find_by_info (info); + } diff --git a/gdb.changes b/gdb.changes index 7a03a72..eef4d5e 100644 --- a/gdb.changes +++ b/gdb.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jul 29 15:44:22 UTC 2020 - Tom de Vries + +- Fix internal error on aarch64 [swo#26316]. + gdb-aarch64-fix-erroneous-use-of-spu-architecture-bfd.patch + ------------------------------------------------------------------- Fri Jul 24 12:39:06 UTC 2020 - Tom de Vries diff --git a/gdb.spec b/gdb.spec index 95c1b04..f3eb6d8 100644 --- a/gdb.spec +++ b/gdb.spec @@ -222,6 +222,7 @@ Patch2019: gdb-fix-range-loop-index-in-find_method.patch Patch2020: gdb-fix-python3.9-related-runtime-problems.patch Patch2021: gdb-fix-unused-function-error.patch Patch2022: gdb-fix-the-thread-pool.c-compilation.patch +Patch2023: gdb-aarch64-fix-erroneous-use-of-spu-architecture-bfd.patch # Proposed patch for PR threads/25478 Patch2502: gdb-threads-fix-hang-in-stop_all_threads-after-killing-inferior.patch @@ -554,6 +555,7 @@ find -name "*.info*"|xargs rm -f %patch2020 -p1 %patch2021 -p1 %patch2022 -p1 +%patch2023 -p1 %patch2502 -p1