a9a56ab6fd
All patches are still relevant, and have been rebased on top of GDB 14.1. GDB 14.1 now needs mpfr unconditionally, so it is added as a dependency of host-gdb, and of gdb when the full debugger is built. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> [yann.morin.1998@free.fr: - add comment about selecting mpfr for 14.x or later ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
From 57b2606e39b2ac90a3810baccbd73161ffdb5f2d Mon Sep 17 00:00:00 2001
|
|
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
Date: Sat, 3 Jun 2017 21:23:52 +0200
|
|
Subject: [PATCH] sh/ptrace: Define pt_{dsp,}regs uapi_pt_{dsp,}regs on !GLIBC
|
|
systems
|
|
|
|
Fixes a pt_{dsp,}regs redefinition when building with the musl C library
|
|
on SuperH.
|
|
|
|
Inspired by
|
|
http://git.yoctoproject.org/clean/cgit.cgi/poky/plain/meta/recipes-devtools/gdb/gdb/0004-ppc-ptrace-Define-pt_regs-uapi_pt_regs-on-GLIBC-syst.patch,
|
|
adapted for SuperH.
|
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
[Rebase on gdb 8.0]
|
|
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
|
---
|
|
gdbserver/linux-sh-low.cc | 8 ++++++++
|
|
1 file changed, 8 insertions(+)
|
|
|
|
diff --git a/gdbserver/linux-sh-low.cc b/gdbserver/linux-sh-low.cc
|
|
index 782b8292010..e42f29b845a 100644
|
|
--- a/gdbserver/linux-sh-low.cc
|
|
+++ b/gdbserver/linux-sh-low.cc
|
|
@@ -76,7 +76,15 @@ extern const struct target_desc *tdesc_sh;
|
|
#include <sys/reg.h>
|
|
#endif
|
|
|
|
+#if !defined(__GLIBC__)
|
|
+# define pt_regs uapi_pt_regs
|
|
+# define pt_dspregs uapi_pt_dspregs
|
|
+#endif
|
|
#include <asm/ptrace.h>
|
|
+#if !defined(__GLIBC__)
|
|
+# undef pt_regs
|
|
+# undef pt_dspregs
|
|
+#endif
|
|
|
|
#define sh_num_regs 41
|
|
|
|
--
|
|
2.43.0
|
|
|