diff mbox

Regression on old kernels (Re: [PATCH v5 00/12] GDB support for more powerpc registers on linux)

Message ID 20181029195007.9384-1-pedromfc@linux.ibm.com
State New
Headers show

Commit Message

Pedro Franco de Carvalho Oct. 29, 2018, 7:50 p.m. UTC
Sorry, didn't think about this possibility!

I've simply added the .h files in the patch below to both the native
and the server targets.  The ptrace call will still be made to
determine the tdesc, but it should return in error and cause the new
features not to be selected (no exceptions are thrown by
check_regset).

Is this ok?

--
Pedro Franco de Carvalho

-- >8 --
Subject: [PATCH] [PowerPC] Include nat/linux-ptrace.h in native targets

Patch "[PowerPC] Add support for PPR and DSCR" used
PTRACE_GETREGSET/SETREGSET without including the fallback definitions
from "nat/linux-ptrace.h".  Include this header to avoid breaking
builds in older kernels that don't define them.

gdb/ChangeLog:
YYYY-MM-DD  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>

	* ppc-linux-nat.c: Include nat/linux-ptrace.h.

gdb/gdbserver/ChangeLog:
YYYY-MM-DD  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>

	* linux-ppc-low.c: Include nat/linux-ptrace.h.
---
 gdb/gdbserver/linux-ppc-low.c | 1 +
 gdb/ppc-linux-nat.c           | 1 +
 2 files changed, 2 insertions(+)
diff mbox

Patch

diff --git a/gdb/gdbserver/linux-ppc-low.c b/gdb/gdbserver/linux-ppc-low.c
index 12cb56a2b2..fd3d8fe194 100644
--- a/gdb/gdbserver/linux-ppc-low.c
+++ b/gdb/gdbserver/linux-ppc-low.c
@@ -28,6 +28,7 @@ 
 #include "arch/ppc-linux-common.h"
 #include "arch/ppc-linux-tdesc.h"
 #include "nat/ppc-linux.h"
+#include "nat/linux-ptrace.h"
 #include "linux-ppc-tdesc-init.h"
 #include "ax.h"
 #include "tracepoint.h"
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index e83912de4b..8d35682ca4 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -36,6 +36,7 @@ 
 #include <fcntl.h>
 #include <sys/procfs.h>
 #include "nat/gdb_ptrace.h"
+#include "nat/linux-ptrace.h"
 #include "inf-ptrace.h"
 
 /* Prototypes for supply_gregset etc.  */