gdb fixes for xtensa
v2 cover gdb fixes for xtensa
Hi,
this series replaces existing gdb-7.4.1 patches for xtensa with their backported versions from binutils-gdb and adds same patches for gdb-7.5.1.
Changes v1 -> v2:
- add #include <stdint.h> to fix build error due to missing uint32_t definition.
Max Filippov (2):
gdb: replace xtensa patches with proper backports from binutils-gdb
gdb: add xtensa fixes for 7.5.1
.../gdb-100-xtensa-fix-linux-ptrace-includes.patch | 60 ++++++++++++++++++++++ .../7.4.1/gdb-101-xtensa-fix-on-64-bit-hosts.patch | 42 +++++++++++++++ package/gdb/7.4.1/xtensa-asm-ptrace-h.patch | 22 -------- package/gdb/7.4.1/xtensa-gdb-regsize.patch | 19 ------- .../gdb-100-xtensa-fix-linux-ptrace-includes.patch | 60 ++++++++++++++++++++++ .../7.5.1/gdb-101-xtensa-fix-on-64-bit-hosts.patch | 42 +++++++++++++++ 6 files changed, 204 insertions(+), 41 deletions(-) create mode 100644 package/gdb/7.4.1/gdb-100-xtensa-fix-linux-ptrace-includes.patch create mode 100644 package/gdb/7.4.1/gdb-101-xtensa-fix-on-64-bit-hosts.patch delete mode 100644 package/gdb/7.4.1/xtensa-asm-ptrace-h.patch delete mode 100644 package/gdb/7.4.1/xtensa-gdb-regsize.patch create mode 100644 package/gdb/7.5.1/gdb-100-xtensa-fix-linux-ptrace-includes.patch create mode 100644 package/gdb/7.5.1/gdb-101-xtensa-fix-on-64-bit-hosts.patch
Signature · 1 line
1.8.1.4
PATCH v2 1/2 gdb: replace xtensa patches with proper backports from binutils-gdb
The functionality is unchanged.
---
Changes v1 -> v2:
- add #include <stdint.h> to fix build error due to missing uint32_t definition.
.../gdb-100-xtensa-fix-linux-ptrace-includes.patch | 60 ++++++++++++++++++++++ .../7.4.1/gdb-101-xtensa-fix-on-64-bit-hosts.patch | 42 +++++++++++++++ package/gdb/7.4.1/xtensa-asm-ptrace-h.patch | 22 -------- package/gdb/7.4.1/xtensa-gdb-regsize.patch | 19 ------- 4 files changed, 102 insertions(+), 41 deletions(-) create mode 100644 package/gdb/7.4.1/gdb-100-xtensa-fix-linux-ptrace-includes.patch create mode 100644 package/gdb/7.4.1/gdb-101-xtensa-fix-on-64-bit-hosts.patch delete mode 100644 package/gdb/7.4.1/xtensa-asm-ptrace-h.patch delete mode 100644 package/gdb/7.4.1/xtensa-gdb-regsize.patch
package/gdb/7.4.1/gdb-100-xtensa-fix-linux-ptrace-includes.patch new file +60 -0
@@ -0,0 +1,60 @@ +From e671835b7afc90b3ff201b79f07a6fb67797bc5c Mon Sep 17 00:00:00 2001 +From: Baruch Siach <[email protected]> +Date: Mon, 20 Jan 2014 09:53:12 +0200 +Subject: [PATCH] gdb: xtensa: fix linux ptrace includes + +Currently, xtensa code using the Linux ptrace interface only include +sys/ptrace.h. This file comes from the C library (glibc and uClibc, +at least), and includes a declaration of the ptrace() functions, along +with some cross architecture constants that are mostly copied from the +file located at include/uapi/linux/ptrace.h in recent Linux kernels. + +For xtensa specific constants like PTRACE_GETXTREGS and +PTRACE_SETXTREGS the asm/ptrace.h include from the Linux kernel UAPI +is needed. The code in gdbserver xtensa specific part doesn't call +ptrace() directly, so we can remove the unneeded sys/ptrace.h include. +The gdb xtensa specific code needs both headers, since it calls +ptrace(). + +gdb/ + * xtensa-linux-nat.c: Include asm/ptrace.h. + +gdb/gdbserver/ + * linux-xtensa-low.c: Include asm/ptrace.h instead of + sys/ptrace.h. +--- +Backported from: e671835b7afc90b3ff201b79f07a6fb67797bc5c +Changes to Changelog files are dropped. + + gdb/gdbserver/linux-xtensa-low.c | 2 +- + gdb/xtensa-linux-nat.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c +index 7db97a9..479b65b 100644 +--- a/gdb/gdbserver/linux-xtensa-low.c ++++ b/gdb/gdbserver/linux-xtensa-low.c +@@ -24,7 +24,7 @@ + void init_registers_xtensa (void); + extern const struct target_desc *tdesc_xtensa; + +-#include <sys/ptrace.h> ++#include <asm/ptrace.h> + #include <xtensa-config.h> + + #include "xtensa-xtregs.c" +diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c +index 2372e79..9340c62 100644 +--- a/gdb/xtensa-linux-nat.c ++++ b/gdb/xtensa-linux-nat.c +@@ -36,6 +36,7 @@ + #include <fcntl.h> + #include <sys/procfs.h> + #include <sys/ptrace.h> ++#include <asm/ptrace.h> + + #include "gregset.h" + #include "xtensa-tdep.h" +-- +1.8.1.4 +
package/gdb/7.4.1/gdb-101-xtensa-fix-on-64-bit-hosts.patch new file +42 -0
42 lines not on this page · raw message
package/gdb/7.4.1/xtensa-asm-ptrace-h.patch deleted +0 -22
@@ -1,22 +0,0 @@ ---- gdb-7.4.1/gdb/xtensa-linux-nat.c.orig 2012-10-19 16:23:06.908165323 -0700 -+++ gdb-7.4.1/gdb/xtensa-linux-nat.c 2012-10-19 16:35:30.792134876 -0700 -@@ -36,7 +36,7 @@ - #include "gdb_wait.h" - #include <fcntl.h> - #include <sys/procfs.h> --#include <sys/ptrace.h> -+#include <asm/ptrace.h> - - #include "gregset.h" - #include "xtensa-tdep.h" ---- gdb-7.4.1/gdb/gdbserver/linux-xtensa-low.c.orig 2012-10-19 16:24:06.260162894 -0700 -+++ gdb-7.4.1/gdb/gdbserver/linux-xtensa-low.c 2012-10-19 16:36:07.920133357 -0700 -@@ -23,7 +23,7 @@ - /* Defined in auto-generated file reg-xtensa.c. */ - void init_registers_xtensa (void); - --#include <sys/ptrace.h> -+#include <asm/ptrace.h> - #include <xtensa-config.h> - - #include "xtensa-xtregs.c"
package/gdb/7.4.1/xtensa-gdb-regsize.patch deleted +0 -19
@@ -1,19 +0,0 @@ ---- gdb-7.4.1/gdb/xtensa-tdep.h.orig 2012-10-30 11:40:23.546448594 -0700 -+++ gdb-7.4.1/gdb/xtensa-tdep.h 2012-10-30 11:41:43.078445337 -0700 -@@ -17,6 +17,7 @@ - You should have received a copy of the GNU General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. */ - -+#include <stdint.h> - - /* XTENSA_TDEP_VERSION can/should be changed along with XTENSA_CONFIG_VERSION - whenever the "tdep" structure changes in an incompatible way. */ -@@ -84,7 +85,7 @@ - /* Xtensa ELF core file register set representation ('.reg' section). - Copied from target-side ELF header <xtensa/elf.h>. */ - --typedef unsigned long xtensa_elf_greg_t; -+typedef uint32_t xtensa_elf_greg_t; - - typedef struct - {
Signature · 1 line
1.8.1.4
PATCH v2 2/2 gdb: add xtensa fixes for 7.5.1
In reply to Max FilippovTwo fixes for xtensa are still applicable to gdb-7.5.1, which is now the default; copy them from 7.4.1. This fixes native gdb build for xtensa.
---
Changes v1 -> v2:
- add #include <stdint.h> to fix build error due to missing uint32_t definition.
.../gdb-100-xtensa-fix-linux-ptrace-includes.patch | 60 ++++++++++++++++++++++ .../7.5.1/gdb-101-xtensa-fix-on-64-bit-hosts.patch | 42 +++++++++++++++ 2 files changed, 102 insertions(+) create mode 100644 package/gdb/7.5.1/gdb-100-xtensa-fix-linux-ptrace-includes.patch create mode 100644 package/gdb/7.5.1/gdb-101-xtensa-fix-on-64-bit-hosts.patch
package/gdb/7.5.1/gdb-100-xtensa-fix-linux-ptrace-includes.patch new file +60 -0
@@ -0,0 +1,60 @@ +From e671835b7afc90b3ff201b79f07a6fb67797bc5c Mon Sep 17 00:00:00 2001 +From: Baruch Siach <[email protected]> +Date: Mon, 20 Jan 2014 09:53:12 +0200 +Subject: [PATCH] gdb: xtensa: fix linux ptrace includes + +Currently, xtensa code using the Linux ptrace interface only include +sys/ptrace.h. This file comes from the C library (glibc and uClibc, +at least), and includes a declaration of the ptrace() functions, along +with some cross architecture constants that are mostly copied from the +file located at include/uapi/linux/ptrace.h in recent Linux kernels. + +For xtensa specific constants like PTRACE_GETXTREGS and +PTRACE_SETXTREGS the asm/ptrace.h include from the Linux kernel UAPI +is needed. The code in gdbserver xtensa specific part doesn't call +ptrace() directly, so we can remove the unneeded sys/ptrace.h include. +The gdb xtensa specific code needs both headers, since it calls +ptrace(). + +gdb/ + * xtensa-linux-nat.c: Include asm/ptrace.h. + +gdb/gdbserver/ + * linux-xtensa-low.c: Include asm/ptrace.h instead of + sys/ptrace.h. +--- +Backported from: e671835b7afc90b3ff201b79f07a6fb67797bc5c +Changes to Changelog files are dropped. + + gdb/gdbserver/linux-xtensa-low.c | 2 +- + gdb/xtensa-linux-nat.c | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/gdb/gdbserver/linux-xtensa-low.c b/gdb/gdbserver/linux-xtensa-low.c +index 7db97a9..479b65b 100644 +--- a/gdb/gdbserver/linux-xtensa-low.c ++++ b/gdb/gdbserver/linux-xtensa-low.c +@@ -24,7 +24,7 @@ + void init_registers_xtensa (void); + extern const struct target_desc *tdesc_xtensa; + +-#include <sys/ptrace.h> ++#include <asm/ptrace.h> + #include <xtensa-config.h> + + #include "xtensa-xtregs.c" +diff --git a/gdb/xtensa-linux-nat.c b/gdb/xtensa-linux-nat.c +index 2372e79..9340c62 100644 +--- a/gdb/xtensa-linux-nat.c ++++ b/gdb/xtensa-linux-nat.c +@@ -36,6 +36,7 @@ + #include <fcntl.h> + #include <sys/procfs.h> + #include <sys/ptrace.h> ++#include <asm/ptrace.h> + + #include "gregset.h" + #include "xtensa-tdep.h" +-- +1.8.1.4 +
package/gdb/7.5.1/gdb-101-xtensa-fix-on-64-bit-hosts.patch new file +42 -0
42 lines not on this page · raw message
Signature · 1 line
1.8.1.4
v2 cover gdb fixes for xtensa
In reply to Max FilippovQuoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Max" == Max Filippov <[email protected]> writes:
Hi,
this series replaces existing gdb-7.4.1 patches for xtensa with their backported versions from binutils-gdb and adds same patches for gdb-7.5.1.
Quoted 7 lines
Changes v1 -> v2:
- add #include <stdint.h> to fix build error due to missinguint32_tdefinition.Max Filippov (2):
gdb: replace xtensa patches with proper backports from binutils-gdb
gdb: add xtensa fixes for 7.5.1
Committed both, thanks.
Signature · 1 line
Bye, Peter Korsgaard