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>
56 lines
1.4 KiB
Diff
56 lines
1.4 KiB
Diff
From 64b8ab56118d2fea027adfb7ebbc01668b29528e Mon Sep 17 00:00:00 2001
|
|
From: Khem Raj <raj.khem@gmail.com>
|
|
Date: Sat, 6 Aug 2016 17:32:50 -0700
|
|
Subject: [PATCH] ppc/ptrace: Define pt_regs uapi_pt_regs on !GLIBC systems
|
|
|
|
Upstream-Status: Pending
|
|
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
[Rebase on gdb 8.3]
|
|
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
|
---
|
|
gdb/nat/ppc-linux.h | 6 ++++++
|
|
gdbserver/linux-ppc-low.cc | 6 ++++++
|
|
2 files changed, 12 insertions(+)
|
|
|
|
diff --git a/gdb/nat/ppc-linux.h b/gdb/nat/ppc-linux.h
|
|
index d937a65b69c..1fd54b4a0e0 100644
|
|
--- a/gdb/nat/ppc-linux.h
|
|
+++ b/gdb/nat/ppc-linux.h
|
|
@@ -18,7 +18,13 @@
|
|
#ifndef NAT_PPC_LINUX_H
|
|
#define NAT_PPC_LINUX_H
|
|
|
|
+#if !defined(__GLIBC__)
|
|
+# define pt_regs uapi_pt_regs
|
|
+#endif
|
|
#include <asm/ptrace.h>
|
|
+#if !defined(__GLIBC__)
|
|
+# undef pt_regs
|
|
+#endif
|
|
#include <asm/cputable.h>
|
|
|
|
/* This sometimes isn't defined. */
|
|
diff --git a/gdbserver/linux-ppc-low.cc b/gdbserver/linux-ppc-low.cc
|
|
index 337d555aee7..5d518f37268 100644
|
|
--- a/gdbserver/linux-ppc-low.cc
|
|
+++ b/gdbserver/linux-ppc-low.cc
|
|
@@ -23,7 +23,13 @@
|
|
#include "elf/common.h"
|
|
#include <sys/uio.h>
|
|
#include <elf.h>
|
|
+#if !defined(__GLIBC__)
|
|
+# define pt_regs uapi_pt_regs
|
|
+#endif
|
|
#include <asm/ptrace.h>
|
|
+#if !defined(__GLIBC__)
|
|
+# undef pt_regs
|
|
+#endif
|
|
|
|
#include "arch/ppc-linux-common.h"
|
|
#include "arch/ppc-linux-tdesc.h"
|
|
--
|
|
2.29.2
|
|
|