board/csky: fixup gdb instructions in readme.txt
[buildroot-gz.git] / package / valgrind / 0002-Define-PTRACE_GETSIGINFO-on-PowerPC-when-not-availab.patch
blob44adfc4190ab27c121a4fdeec49ca77a3798b6ba
1 From 7311686d6286972ff97cc18b2416a4cdd7fc5c7e Mon Sep 17 00:00:00 2001
2 From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3 Date: Sat, 31 Oct 2015 12:15:24 +0100
4 Subject: [PATCH] Define PTRACE_GETSIGINFO on PowerPC when not available
6 uClibc 0.9.33.2 does not define PTRACE_GETSIGINFO in PowerPC. Even
7 though Buildroot has a uClibc patch doing that, it doesn't solve the
8 case of external uClibc toolchain from other sources (such as
9 Crosstool-NG). Therefore, this patch modifies Valgrind to define
10 PTRACE_GETSIGINFO on PowerPC to the right value, when such definition
11 is not available from the C library.
13 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
14 ---
15 coregrind/vgdb-invoker-ptrace.c | 6 ++++++
16 1 file changed, 6 insertions(+)
18 diff --git a/coregrind/vgdb-invoker-ptrace.c b/coregrind/vgdb-invoker-ptrace.c
19 index d65f59a..bdefac2 100644
20 --- a/coregrind/vgdb-invoker-ptrace.c
21 +++ b/coregrind/vgdb-invoker-ptrace.c
22 @@ -72,6 +72,12 @@
23 # endif
24 #endif
26 +#if defined(__powerpc__)
27 +# ifndef PTRACE_GETSIGINFO
28 +# define PTRACE_GETSIGINFO 0x4202
29 +# endif
30 +#endif
32 // 32-bit or 64-bit wide, depending on primary architecture.
33 typedef Addr CORE_ADDR;
34 typedef Addr PTRACE_XFER_TYPE;
35 --
36 2.1.4