diff options
Diffstat (limited to 'meta/recipes-devtools/gdb/gdb/renesas-sh-native-support.patch')
-rw-r--r-- | meta/recipes-devtools/gdb/gdb/renesas-sh-native-support.patch | 194 |
1 files changed, 92 insertions, 102 deletions
diff --git a/meta/recipes-devtools/gdb/gdb/renesas-sh-native-support.patch b/meta/recipes-devtools/gdb/gdb/renesas-sh-native-support.patch index 2b1ceb79f2..15ff62013e 100644 --- a/meta/recipes-devtools/gdb/gdb/renesas-sh-native-support.patch +++ b/meta/recipes-devtools/gdb/gdb/renesas-sh-native-support.patch @@ -20,11 +20,11 @@ Last-Update: <2011-11-17> Upstream-Status: Pending Signed-off-by: Khem Raj <raj.khem@gmail.com> -Index: gdb-7.4/gdb/configure.host +Index: gdb-7.5/gdb/configure.host =================================================================== ---- gdb-7.4.orig/gdb/configure.host 2012-04-24 07:06:35.085317177 -0700 -+++ gdb-7.4/gdb/configure.host 2012-04-24 07:09:14.365324889 -0700 -@@ -139,6 +139,7 @@ +--- gdb-7.5.orig/gdb/configure.host 2012-05-30 12:41:34.000000000 -0700 ++++ gdb-7.5/gdb/configure.host 2012-09-19 14:40:42.974609772 -0700 +@@ -140,6 +140,7 @@ s390*-*-*) gdb_host=s390 ;; @@ -32,11 +32,11 @@ Index: gdb-7.4/gdb/configure.host sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu) gdb_host=nbsd ;; sh*-*-openbsd*) gdb_host=nbsd ;; -Index: gdb-7.4/gdb/Makefile.in +Index: gdb-7.5/gdb/Makefile.in =================================================================== ---- gdb-7.4.orig/gdb/Makefile.in 2012-04-24 07:06:35.093317178 -0700 -+++ gdb-7.4/gdb/Makefile.in 2012-04-24 07:09:14.369324886 -0700 -@@ -1544,6 +1544,7 @@ +--- gdb-7.5.orig/gdb/Makefile.in 2012-07-02 08:29:33.000000000 -0700 ++++ gdb-7.5/gdb/Makefile.in 2012-09-19 14:40:42.974609772 -0700 +@@ -1493,6 +1493,7 @@ score-tdep.c \ ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \ sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \ @@ -44,11 +44,11 @@ Index: gdb-7.4/gdb/Makefile.in sol2-tdep.c \ solib-irix.c solib-svr4.c solib-sunos.c \ sparc-linux-nat.c sparc-linux-tdep.c \ -Index: gdb-7.4/gdb/sh-linux-tdep.c +Index: gdb-7.5/gdb/sh-linux-tdep.c =================================================================== ---- gdb-7.4.orig/gdb/sh-linux-tdep.c 2012-04-24 07:06:35.073317177 -0700 -+++ gdb-7.4/gdb/sh-linux-tdep.c 2012-04-24 07:09:14.369324886 -0700 -@@ -18,11 +18,34 @@ +--- gdb-7.5.orig/gdb/sh-linux-tdep.c 2012-05-07 06:17:29.000000000 -0700 ++++ gdb-7.5/gdb/sh-linux-tdep.c 2012-09-19 14:46:50.610623784 -0700 +@@ -18,14 +18,37 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "defs.h" @@ -71,6 +71,9 @@ Index: gdb-7.4/gdb/sh-linux-tdep.c +#include "command.h" +#include "gdb_assert.h" + #include "trad-frame.h" + #include "tramp-frame.h" + +#include <sys/ptrace.h> +#include <sys/types.h> +#include <sys/param.h> @@ -83,8 +86,8 @@ Index: gdb-7.4/gdb/sh-linux-tdep.c #include "glibc-tdep.h" #include "sh-tdep.h" #include "linux-tdep.h" -@@ -70,9 +93,505 @@ - {-1 /* Terminator. */, 0} +@@ -180,9 +203,505 @@ + sh_linux_rt_sigreturn_init }; +/* Recognizing signal handler frames. */ @@ -589,10 +592,10 @@ Index: gdb-7.4/gdb/sh-linux-tdep.c linux_init_abi (info, gdbarch); /* GNU/Linux uses SVR4-style shared libraries. */ -Index: gdb-7.4/gdb/sh-tdep.h +Index: gdb-7.5/gdb/sh-tdep.h =================================================================== ---- gdb-7.4.orig/gdb/sh-tdep.h 2012-04-24 07:06:35.101317178 -0700 -+++ gdb-7.4/gdb/sh-tdep.h 2012-04-24 07:09:14.369324886 -0700 +--- gdb-7.5.orig/gdb/sh-tdep.h 2012-03-01 15:55:40.000000000 -0800 ++++ gdb-7.5/gdb/sh-tdep.h 2012-09-19 14:48:32.406627602 -0700 @@ -21,6 +21,12 @@ /* Contributed by Steve Chamberlain sac@cygnus.com. */ @@ -614,10 +617,10 @@ Index: gdb-7.4/gdb/sh-tdep.h PC_REGNUM = 16, PR_REGNUM = 17, GBR_REGNUM = 18, -@@ -82,8 +89,26 @@ +@@ -81,6 +88,24 @@ + FV0_REGNUM = 76, FV_LAST_REGNUM = 79 }; - +#define SH_NUM_REGS 67 + +struct sh_frame_cache @@ -635,13 +638,11 @@ Index: gdb-7.4/gdb/sh-tdep.h + CORE_ADDR saved_sp; +}; + - extern gdbarch_init_ftype sh64_gdbarch_init; - extern void sh64_show_regs (struct frame_info *); +extern struct sh_frame_cache *sh_frame_cache (struct frame_info *next_frame, void **this_cache); /* This structure describes a register in a core-file. */ struct sh_corefile_regmap -@@ -92,8 +117,32 @@ +@@ -89,8 +114,32 @@ unsigned int offset; }; @@ -674,10 +675,10 @@ Index: gdb-7.4/gdb/sh-tdep.h /* Non-NULL when debugging from a core file. Provides the offset where each general-purpose register is stored inside the associated core file section. */ -Index: gdb-7.4/gdb/sh-linux-nat.c +Index: gdb-7.5/gdb/sh-linux-nat.c =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4/gdb/sh-linux-nat.c 2012-04-24 07:09:28.557325573 -0700 ++++ gdb-7.5/gdb/sh-linux-nat.c 2012-09-19 14:40:42.978609771 -0700 @@ -0,0 +1,269 @@ +/* Low level SH interface to ptrace, for GDB when running native. + Copyright (C) 2002, 2004 Free Software Foundation, Inc. @@ -948,10 +949,10 @@ Index: gdb-7.4/gdb/sh-linux-nat.c + /* Register the target. */ + linux_nat_add_target (t); +} -Index: gdb-7.4/gdb/sh-tdep.c +Index: gdb-7.5/gdb/sh-tdep.c =================================================================== ---- gdb-7.4.orig/gdb/sh-tdep.c 2012-04-24 07:06:35.109317179 -0700 -+++ gdb-7.4/gdb/sh-tdep.c 2012-04-24 07:09:14.369324886 -0700 +--- gdb-7.5.orig/gdb/sh-tdep.c 2012-06-08 07:24:57.000000000 -0700 ++++ gdb-7.5/gdb/sh-tdep.c 2012-09-19 14:45:09.770619943 -0700 @@ -21,6 +21,9 @@ sac@cygnus.com. */ @@ -972,7 +973,7 @@ Index: gdb-7.4/gdb/sh-tdep.c #include "reggroups.h" @@ -69,23 +73,6 @@ - static void (*sh_show_regs) (struct frame_info *); + static const char *sh_active_calling_convention = sh_cc_gcc; -#define SH_NUM_REGS 67 - @@ -994,7 +995,7 @@ Index: gdb-7.4/gdb/sh-tdep.c static int sh_is_renesas_calling_convention (struct type *func_type) { -@@ -1040,7 +1027,7 @@ +@@ -1045,7 +1032,7 @@ return 0; /* Otherwise if the type of that member is float, the whole type is treated as float. */ @@ -1003,7 +1004,7 @@ Index: gdb-7.4/gdb/sh-tdep.c return 1; /* Otherwise it's not treated as float. */ return 0; -@@ -1090,7 +1077,7 @@ +@@ -1095,7 +1082,7 @@ in four registers available. Loop thru args from first to last. */ for (argnum = 0; argnum < nargs; argnum++) { @@ -1012,7 +1013,7 @@ Index: gdb-7.4/gdb/sh-tdep.c len = TYPE_LENGTH (type); val = sh_justify_value_in_reg (gdbarch, args[argnum], len); -@@ -2508,7 +2495,7 @@ +@@ -1809,7 +1796,7 @@ reg->how = DWARF2_FRAME_REG_UNDEFINED; } @@ -1021,7 +1022,7 @@ Index: gdb-7.4/gdb/sh-tdep.c sh_alloc_frame_cache (void) { struct sh_frame_cache *cache; -@@ -2535,7 +2522,7 @@ +@@ -1836,7 +1823,7 @@ return cache; } @@ -1030,7 +1031,7 @@ Index: gdb-7.4/gdb/sh-tdep.c sh_frame_cache (struct frame_info *this_frame, void **this_cache) { struct gdbarch *gdbarch = get_frame_arch (this_frame); -@@ -2593,9 +2580,9 @@ +@@ -1903,9 +1890,9 @@ return cache; } @@ -1043,7 +1044,7 @@ Index: gdb-7.4/gdb/sh-tdep.c { struct gdbarch *gdbarch = get_frame_arch (this_frame); struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache); -@@ -2609,7 +2596,7 @@ +@@ -1919,7 +1906,7 @@ the current frame. Frob regnum so that we pull the value from the correct place. */ if (regnum == gdbarch_pc_regnum (gdbarch)) @@ -1052,7 +1053,7 @@ Index: gdb-7.4/gdb/sh-tdep.c if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1) return frame_unwind_got_memory (this_frame, regnum, -@@ -2853,8 +2840,8 @@ +@@ -2225,8 +2212,8 @@ static struct gdbarch * sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) { @@ -1060,9 +1061,9 @@ Index: gdb-7.4/gdb/sh-tdep.c struct gdbarch_tdep *tdep; + struct gdbarch *gdbarch; - sh_show_regs = sh_generic_show_regs; - switch (info.bfd_arch_info->mach) -@@ -2917,6 +2904,18 @@ + /* SH5 is handled entirely in sh64-tdep.c. */ + if (info.bfd_arch_info->mach == bfd_mach_sh5) +@@ -2242,6 +2229,18 @@ tdep = XZALLOC (struct gdbarch_tdep); gdbarch = gdbarch_alloc (&info, tdep); @@ -1081,7 +1082,7 @@ Index: gdb-7.4/gdb/sh-tdep.c set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT); set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT); set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT); -@@ -3062,10 +3061,11 @@ +@@ -2389,10 +2388,11 @@ break; } @@ -1091,13 +1092,13 @@ Index: gdb-7.4/gdb/sh-tdep.c gdbarch_init_osabi (info, gdbarch); - dwarf2_append_unwinders (gdbarch); + frame_unwind_append_unwinder (gdbarch, &sh_stub_unwind); frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind); - return gdbarch; -Index: gdb-7.4/gdb/testsuite/gdb.asm/sh-linux.inc +Index: gdb-7.5/gdb/testsuite/gdb.asm/sh-linux.inc =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4/gdb/testsuite/gdb.asm/sh-linux.inc 2012-04-24 07:09:14.369324886 -0700 ++++ gdb-7.5/gdb/testsuite/gdb.asm/sh-linux.inc 2012-09-19 14:40:42.978609771 -0700 @@ -0,0 +1,78 @@ +# You'll find a bunch of nop opcodes in the below macros. They are +# there to keep the code correctly aligned. Be careful to maintain @@ -1177,10 +1178,10 @@ Index: gdb-7.4/gdb/testsuite/gdb.asm/sh-linux.inc +\name: + .long \value + .endm -Index: gdb-7.4/gdb/testsuite/gdb.asm/sh.inc +Index: gdb-7.5/gdb/testsuite/gdb.asm/sh.inc =================================================================== ---- gdb-7.4.orig/gdb/testsuite/gdb.asm/sh.inc 2012-04-24 07:06:35.001317175 -0700 -+++ gdb-7.4/gdb/testsuite/gdb.asm/sh.inc 2012-04-24 07:09:14.369324886 -0700 +--- gdb-7.5.orig/gdb/testsuite/gdb.asm/sh.inc 2012-04-16 01:02:09.000000000 -0700 ++++ gdb-7.5/gdb/testsuite/gdb.asm/sh.inc 2012-09-19 14:40:42.978609771 -0700 @@ -40,9 +40,8 @@ mov.l .Lconst\@,r1 bra .Lafterconst\@ @@ -1192,11 +1193,11 @@ Index: gdb-7.4/gdb/testsuite/gdb.asm/sh.inc .long \subr .align 1 .Lafterconst\@: -Index: gdb-7.4/gdb/testsuite/gdb.asm/asm-source.exp +Index: gdb-7.5/gdb/testsuite/gdb.asm/asm-source.exp =================================================================== ---- gdb-7.4.orig/gdb/testsuite/gdb.asm/asm-source.exp 2012-04-24 07:06:35.009317179 -0700 -+++ gdb-7.4/gdb/testsuite/gdb.asm/asm-source.exp 2012-04-24 07:09:14.369324886 -0700 -@@ -110,6 +110,11 @@ +--- gdb-7.5.orig/gdb/testsuite/gdb.asm/asm-source.exp 2012-06-25 13:11:43.000000000 -0700 ++++ gdb-7.5/gdb/testsuite/gdb.asm/asm-source.exp 2012-09-19 14:40:42.978609771 -0700 +@@ -108,6 +108,11 @@ append link-flags " -m elf32ppc" } } @@ -1208,80 +1209,69 @@ Index: gdb-7.4/gdb/testsuite/gdb.asm/asm-source.exp "sh*-*-*" { set asm-arch sh set debug-flags "-gdwarf-2" -Index: gdb-7.4/gdb/testsuite/gdb.base/sigall.c +Index: gdb-7.5/gdb/testsuite/gdb.base/sigall.c =================================================================== ---- gdb-7.4.orig/gdb/testsuite/gdb.base/sigall.c 2012-04-24 07:06:35.037317176 -0700 -+++ gdb-7.4/gdb/testsuite/gdb.base/sigall.c 2012-04-24 07:09:14.369324886 -0700 -@@ -1,9 +1,9 @@ - #include <signal.h> - #include <unistd.h> - --#ifdef __sh__ --#define signal(a,b) /* Signals not supported on this target - make them go away */ --#endif -+ -+ -+ - +--- gdb-7.5.orig/gdb/testsuite/gdb.base/sigall.c 2012-02-28 02:24:15.000000000 -0800 ++++ gdb-7.5/gdb/testsuite/gdb.base/sigall.c 2012-09-19 14:42:02.202612808 -0700 +@@ -5,6 +5,10 @@ /* Signal handlers, we set breakpoints in them to make sure that the signals really get delivered. */ -Index: gdb-7.4/gdb/testsuite/gdb.base/signals.c + ++#ifdef __sh__ ++#define signal(a,b) /* Signals not supported on this target - make them go away */ ++#endif ++ + #ifdef PROTOTYPES + void + handle_ABRT (int sig) +Index: gdb-7.5/gdb/testsuite/gdb.base/signals.c =================================================================== ---- gdb-7.4.orig/gdb/testsuite/gdb.base/signals.c 2012-04-24 07:06:35.049317176 -0700 -+++ gdb-7.4/gdb/testsuite/gdb.base/signals.c 2012-04-24 07:09:14.373324884 -0700 -@@ -3,10 +3,10 @@ +--- gdb-7.5.orig/gdb/testsuite/gdb.base/signals.c 2012-02-28 02:24:15.000000000 -0800 ++++ gdb-7.5/gdb/testsuite/gdb.base/signals.c 2012-09-19 14:43:22.034615831 -0700 +@@ -3,6 +3,10 @@ #include <signal.h> #include <unistd.h> --#ifdef __sh__ --#define signal(a,b) /* Signals not supported on this target - make them go away */ --#define alarm(a) /* Ditto for alarm() */ --#endif -+ -+ -+ -+ ++#ifdef __sh__ ++#define signal(a,b) /* Signals not supported on this target - make them go away */ ++#define alarm(a) /* Ditto for alarm() */ ++#endif static int count = 0; -Index: gdb-7.4/gdb/testsuite/gdb.base/annota1.c +Index: gdb-7.5/gdb/testsuite/gdb.base/annota1.c =================================================================== ---- gdb-7.4.orig/gdb/testsuite/gdb.base/annota1.c 2012-04-24 07:06:35.021317172 -0700 -+++ gdb-7.4/gdb/testsuite/gdb.base/annota1.c 2012-04-24 07:09:14.373324884 -0700 -@@ -1,9 +1,9 @@ +--- gdb-7.5.orig/gdb/testsuite/gdb.base/annota1.c 2012-02-28 14:40:48.000000000 -0800 ++++ gdb-7.5/gdb/testsuite/gdb.base/annota1.c 2012-09-19 14:42:42.074614308 -0700 +@@ -1,6 +1,9 @@ #include <stdio.h> #include <signal.h> --#ifdef __sh__ --#define signal(a,b) /* Signals not supported on this target - make them go away */ --#endif -+ -+ -+ - ++#ifdef __sh__ ++#define signal(a,b) /* Signals not supported on this target - make them go away */ ++#endif #ifdef PROTOTYPES -Index: gdb-7.4/gdb/testsuite/gdb.base/annota3.c + void +Index: gdb-7.5/gdb/testsuite/gdb.base/annota3.c =================================================================== ---- gdb-7.4.orig/gdb/testsuite/gdb.base/annota3.c 2012-04-24 07:06:35.029317176 -0700 -+++ gdb-7.4/gdb/testsuite/gdb.base/annota3.c 2012-04-24 07:09:14.373324884 -0700 -@@ -1,9 +1,9 @@ +--- gdb-7.5.orig/gdb/testsuite/gdb.base/annota3.c 2012-02-28 14:40:48.000000000 -0800 ++++ gdb-7.5/gdb/testsuite/gdb.base/annota3.c 2012-09-19 14:43:54.410617081 -0700 +@@ -1,6 +1,10 @@ #include <stdio.h> #include <signal.h> --#ifdef __sh__ --#define signal(a,b) /* Signals not supported on this target - make them go away */ --#endif -+ ++#ifdef __sh__ ++#define signal(a,b) /* Signals not supported on this target - make them go away */ ++#endif + -+ - #ifdef PROTOTYPES -Index: gdb-7.4/gdb/config/sh/xm-linux.h + void +Index: gdb-7.5/gdb/config/sh/xm-linux.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4/gdb/config/sh/xm-linux.h 2012-04-24 07:09:14.373324884 -0700 ++++ gdb-7.5/gdb/config/sh/xm-linux.h 2012-09-19 14:40:42.994609807 -0700 @@ -0,0 +1,32 @@ +/* Native support for GNU/Linux, for GDB, the GNU debugger. + Copyright (C) 2000 Free Software Foundation, Inc. @@ -1315,10 +1305,10 @@ Index: gdb-7.4/gdb/config/sh/xm-linux.h +#include <unistd.h> + +#endif /* #ifndef XM_LINUX_H */ -Index: gdb-7.4/gdb/config/sh/nm-linux.h +Index: gdb-7.5/gdb/config/sh/nm-linux.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4/gdb/config/sh/nm-linux.h 2012-04-24 07:09:14.373324884 -0700 ++++ gdb-7.5/gdb/config/sh/nm-linux.h 2012-09-19 14:40:42.994609807 -0700 @@ -0,0 +1,54 @@ +/* Native-dependent definitions for SuperH running Linux, for GDB. + Copyright 2004 Free Software Foundation, Inc. @@ -1374,10 +1364,10 @@ Index: gdb-7.4/gdb/config/sh/nm-linux.h +#define CANNOT_STORE_REGISTER(regno) cannot_store_register (regno) + +#endif /* NM_LINUX_H */ -Index: gdb-7.4/gdb/config/sh/linux.mh +Index: gdb-7.5/gdb/config/sh/linux.mh =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ gdb-7.4/gdb/config/sh/linux.mh 2012-04-24 07:36:11.709403160 -0700 ++++ gdb-7.5/gdb/config/sh/linux.mh 2012-09-19 14:40:42.994609807 -0700 @@ -0,0 +1,8 @@ +# Host: Renesas Super-H running GNU/Linux +NAT_FILE= config/sh/nm-linux.h |