Regression on old kernels (Re: [PATCH v5 00/12] GDB support for more powerpc registers on linux)
Commit Message
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(+)
@@ -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"
@@ -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. */