Skip to contentSkip to conversation

gdb: add xtensa fixes for 7.5.1

PATCH New Max Filippov 2 participants 3 messages May 15, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gdb: add xtensa fixes for 7.5.1

Two fixes for xtensa are still applicable to gdb-7.5.1, which is now the default; copy them from 7.4.1 and rename accordingly.
This fixes native and cross-gdb build for xtensa.

---
 .../gdb/7.5.1/gdb-100-xtensa-asm-ptrace-h.patch    | 22 ++++++++++++++++++++++
 package/gdb/7.5.1/gdb-101-xtensa-regsize.patch     | 19 +++++++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 package/gdb/7.5.1/gdb-100-xtensa-asm-ptrace-h.patch
 create mode 100644 package/gdb/7.5.1/gdb-101-xtensa-regsize.patch
package/gdb/7.5.1/gdb-100-xtensa-asm-ptrace-h.patch new file +22 -0
new file mode 100644
index 0000000..3d1b07c
@@ -0,0 +1,22 @@
+--- 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.5.1/gdb-101-xtensa-regsize.patch new file +19 -0
new file mode 100644
index 0000000..e10bb8f
@@ -0,0 +1,19 @@
+--- 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
#1 lore raw

PATCH 1/1 gdb: add xtensa fixes for 7.5.1

Dear Max Filippov,

Quoted 11 lines · Max Filippov

Two fixes for xtensa are still applicable to gdb-7.5.1, which is now the default; copy them from 7.4.1 and rename accordingly.
This fixes native and cross-gdb build for xtensa.

---
 .../gdb/7.5.1/gdb-100-xtensa-asm-ptrace-h.patch    | 22 ++++++++++++++++++++++
 package/gdb/7.5.1/gdb-101-xtensa-regsize.patch     | 19 +++++++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 package/gdb/7.5.1/gdb-100-xtensa-asm-ptrace-h.patch
 create mode 100644 package/gdb/7.5.1/gdb-101-xtensa-regsize.patch

Thanks. It would have been nice to have description + Signed-off-by for these patches. I know they already exist in the tree for 7.4.1, but it's not an excuse to continue to do things badly :-)

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 gdb: add xtensa fixes for 7.5.1

Quoted 15 lines · Thomas Petazzoni

Dear Max Filippov,

Quoted 11 lines · Max Filippov

Two fixes for xtensa are still applicable to gdb-7.5.1, which is now the default; copy them from 7.4.1 and rename accordingly.
This fixes native and cross-gdb build for xtensa.

---
 .../gdb/7.5.1/gdb-100-xtensa-asm-ptrace-h.patch    | 22 ++++++++++++++++++++++
 package/gdb/7.5.1/gdb-101-xtensa-regsize.patch     | 19 +++++++++++++++++++
 2 files changed, 41 insertions(+)
 create mode 100644 package/gdb/7.5.1/gdb-100-xtensa-asm-ptrace-h.patch
 create mode 100644 package/gdb/7.5.1/gdb-101-xtensa-regsize.patch
Quoted 3 lines

Thanks. It would have been nice to have description + Signed-off-by for these patches. I know they already exist in the tree for 7.4.1, but it's not an excuse to continue to do things badly :-)

Sure, I can backport these patches from the binutils-gdb, they have all that.

Signature · 2 lines
Thanks.
-- Max