bc7322fe54
All patch from gdb 10.2 are kept. Starting from version 11.x, gdb needs the gmp library. The target variant needs a bit of care: if BR2_GDB_VERSION_11 is not set, either the host gdb is not enabled, in which case the default for the target gdb is 9.x, or the host gdb is enabled, and another version is selected. Signed-off-by: Michael Fischer <mf@go-sys.de> [Thomas: - fix how the gmp dependency is handled - set BR2_PACKAGE_GDB_TOPLEVEL to y for gdb 11.x - fix how BR2_GDB_VERSION is set for gdb 11.x] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> [yann.morin.1998@free.fr: - only select target gmp if using gdb 11 ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
From d205f398e1e36f9673f50f368a3f29fd1dfaa794 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 a6d3fc60047..b83cce6b9fe 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.29.2
|
|
|