summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch')
-rw-r--r--meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch139
1 files changed, 71 insertions, 68 deletions
diff --git a/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch b/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
index f678598284..f840cafe2e 100644
--- a/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
+++ b/meta/recipes-devtools/gdb/gdb/0005-Add-support-for-Renesas-SH-sh4-architecture.patch
@@ -1,4 +1,4 @@
1From 8757b36be6109f6d7ea0bd8dafbaed647e0d2192 Mon Sep 17 00:00:00 2001 1From 215486b53a7a6dfca064cd2e9196a9de6ed6f0c2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 2 Mar 2015 02:31:12 +0000 3Date: Mon, 2 Mar 2015 02:31:12 +0000
4Subject: [PATCH 05/11] Add support for Renesas SH (sh4) architecture. 4Subject: [PATCH 05/11] Add support for Renesas SH (sh4) architecture.
@@ -26,24 +26,24 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
26 gdb/testsuite/gdb.base/signals.c | 4 + 26 gdb/testsuite/gdb.base/signals.c | 4 +
27 11 files changed, 617 insertions(+), 29 deletions(-) 27 11 files changed, 617 insertions(+), 29 deletions(-)
28 28
29Index: gdb-8.1/gdb/Makefile.in 29diff --git a/gdb/Makefile.in b/gdb/Makefile.in
30=================================================================== 30index c76a4e4394..921fdadb49 100644
31--- gdb-8.1.orig/gdb/Makefile.in 31--- a/gdb/Makefile.in
32+++ gdb-8.1/gdb/Makefile.in 32+++ b/gdb/Makefile.in
33@@ -758,6 +758,8 @@ ALL_TARGET_OBS = \ 33@@ -2326,6 +2326,8 @@ ALLDEPFILES = \
34 sh-linux-tdep.o \ 34 sh-nbsd-nat.c \
35 sh-nbsd-tdep.o \ 35 sh-nbsd-tdep.c \
36 sh-tdep.o \ 36 sh-tdep.c \
37+ sh-linux-tdep.o \ 37+ sh-linux-tdep.c \
38+ sh-linux-nat.o \ 38+ sh-linux-nat.c \
39 sh64-tdep.o \ 39 sol2-tdep.c \
40 sol2-tdep.o \ 40 solib-aix.c \
41 solib-aix.o \ 41 solib-spu.c \
42Index: gdb-8.1/gdb/configure.host 42diff --git a/gdb/configure.host b/gdb/configure.host
43=================================================================== 43index 23a2f16399..39a886ec53 100644
44--- gdb-8.1.orig/gdb/configure.host 44--- a/gdb/configure.host
45+++ gdb-8.1/gdb/configure.host 45+++ b/gdb/configure.host
46@@ -152,6 +152,7 @@ powerpc*-*-linux*) gdb_host=linux ;; 46@@ -153,6 +153,7 @@ riscv*-*-linux*) gdb_host=linux ;;
47 47
48 s390*-*-linux*) gdb_host=linux ;; 48 s390*-*-linux*) gdb_host=linux ;;
49 49
@@ -51,10 +51,10 @@ Index: gdb-8.1/gdb/configure.host
51 sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu) 51 sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu)
52 gdb_host=nbsd ;; 52 gdb_host=nbsd ;;
53 sh*-*-openbsd*) gdb_host=nbsd ;; 53 sh*-*-openbsd*) gdb_host=nbsd ;;
54Index: gdb-8.1/gdb/sh-linux-tdep.c 54diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c
55=================================================================== 55index db93967910..4109c549e8 100644
56--- gdb-8.1.orig/gdb/sh-linux-tdep.c 56--- a/gdb/sh-linux-tdep.c
57+++ gdb-8.1/gdb/sh-linux-tdep.c 57+++ b/gdb/sh-linux-tdep.c
58@@ -18,14 +18,37 @@ 58@@ -18,14 +18,37 @@
59 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 59 along with this program. If not, see <http://www.gnu.org/licenses/>. */
60 60
@@ -93,7 +93,7 @@ Index: gdb-8.1/gdb/sh-linux-tdep.c
93 #include "glibc-tdep.h" 93 #include "glibc-tdep.h"
94 #include "sh-tdep.h" 94 #include "sh-tdep.h"
95 #include "linux-tdep.h" 95 #include "linux-tdep.h"
96@@ -180,9 +203,505 @@ static struct tramp_frame sh_linux_rt_si 96@@ -180,9 +203,505 @@ static struct tramp_frame sh_linux_rt_sigreturn_tramp_frame = {
97 sh_linux_rt_sigreturn_init 97 sh_linux_rt_sigreturn_init
98 }; 98 };
99 99
@@ -599,10 +599,10 @@ Index: gdb-8.1/gdb/sh-linux-tdep.c
599 linux_init_abi (info, gdbarch); 599 linux_init_abi (info, gdbarch);
600 600
601 /* GNU/Linux uses SVR4-style shared libraries. */ 601 /* GNU/Linux uses SVR4-style shared libraries. */
602Index: gdb-8.1/gdb/sh-tdep.c 602diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
603=================================================================== 603index fe64cf979a..4417114cd0 100644
604--- gdb-8.1.orig/gdb/sh-tdep.c 604--- a/gdb/sh-tdep.c
605+++ gdb-8.1/gdb/sh-tdep.c 605+++ b/gdb/sh-tdep.c
606@@ -21,6 +21,9 @@ 606@@ -21,6 +21,9 @@
607 sac@cygnus.com. */ 607 sac@cygnus.com. */
608 608
@@ -613,7 +613,7 @@ Index: gdb-8.1/gdb/sh-tdep.c
613 #include "frame.h" 613 #include "frame.h"
614 #include "frame-base.h" 614 #include "frame-base.h"
615 #include "frame-unwind.h" 615 #include "frame-unwind.h"
616@@ -67,23 +70,6 @@ static const char *const sh_cc_enum[] = 616@@ -66,23 +69,6 @@ static const char *const sh_cc_enum[] = {
617 617
618 static const char *sh_active_calling_convention = sh_cc_gcc; 618 static const char *sh_active_calling_convention = sh_cc_gcc;
619 619
@@ -637,7 +637,7 @@ Index: gdb-8.1/gdb/sh-tdep.c
637 static int 637 static int
638 sh_is_renesas_calling_convention (struct type *func_type) 638 sh_is_renesas_calling_convention (struct type *func_type)
639 { 639 {
640@@ -1051,7 +1037,7 @@ sh_treat_as_flt_p (struct type *type) 640@@ -1050,7 +1036,7 @@ sh_treat_as_flt_p (struct type *type)
641 return 0; 641 return 0;
642 /* Otherwise if the type of that member is float, the whole type is 642 /* Otherwise if the type of that member is float, the whole type is
643 treated as float. */ 643 treated as float. */
@@ -646,7 +646,7 @@ Index: gdb-8.1/gdb/sh-tdep.c
646 return 1; 646 return 1;
647 /* Otherwise it's not treated as float. */ 647 /* Otherwise it's not treated as float. */
648 return 0; 648 return 0;
649@@ -1101,7 +1087,7 @@ sh_push_dummy_call_fpu (struct gdbarch * 649@@ -1100,7 +1086,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
650 in four registers available. Loop thru args from first to last. */ 650 in four registers available. Loop thru args from first to last. */
651 for (argnum = 0; argnum < nargs; argnum++) 651 for (argnum = 0; argnum < nargs; argnum++)
652 { 652 {
@@ -655,7 +655,7 @@ Index: gdb-8.1/gdb/sh-tdep.c
655 len = TYPE_LENGTH (type); 655 len = TYPE_LENGTH (type);
656 val = sh_justify_value_in_reg (gdbarch, args[argnum], len); 656 val = sh_justify_value_in_reg (gdbarch, args[argnum], len);
657 657
658@@ -1835,7 +1821,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch 658@@ -1834,7 +1820,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
659 reg->how = DWARF2_FRAME_REG_UNDEFINED; 659 reg->how = DWARF2_FRAME_REG_UNDEFINED;
660 } 660 }
661 661
@@ -664,7 +664,7 @@ Index: gdb-8.1/gdb/sh-tdep.c
664 sh_alloc_frame_cache (void) 664 sh_alloc_frame_cache (void)
665 { 665 {
666 struct sh_frame_cache *cache; 666 struct sh_frame_cache *cache;
667@@ -1862,7 +1848,7 @@ sh_alloc_frame_cache (void) 667@@ -1861,7 +1847,7 @@ sh_alloc_frame_cache (void)
668 return cache; 668 return cache;
669 } 669 }
670 670
@@ -673,7 +673,7 @@ Index: gdb-8.1/gdb/sh-tdep.c
673 sh_frame_cache (struct frame_info *this_frame, void **this_cache) 673 sh_frame_cache (struct frame_info *this_frame, void **this_cache)
674 { 674 {
675 struct gdbarch *gdbarch = get_frame_arch (this_frame); 675 struct gdbarch *gdbarch = get_frame_arch (this_frame);
676@@ -1929,9 +1915,9 @@ sh_frame_cache (struct frame_info *this_ 676@@ -1928,9 +1914,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
677 return cache; 677 return cache;
678 } 678 }
679 679
@@ -686,7 +686,7 @@ Index: gdb-8.1/gdb/sh-tdep.c
686 { 686 {
687 struct gdbarch *gdbarch = get_frame_arch (this_frame); 687 struct gdbarch *gdbarch = get_frame_arch (this_frame);
688 struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache); 688 struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache);
689@@ -1945,7 +1931,7 @@ sh_frame_prev_register (struct frame_inf 689@@ -1944,7 +1930,7 @@ sh_frame_prev_register (struct frame_info *this_frame,
690 the current frame. Frob regnum so that we pull the value from 690 the current frame. Frob regnum so that we pull the value from
691 the correct place. */ 691 the correct place. */
692 if (regnum == gdbarch_pc_regnum (gdbarch)) 692 if (regnum == gdbarch_pc_regnum (gdbarch))
@@ -695,7 +695,7 @@ Index: gdb-8.1/gdb/sh-tdep.c
695 695
696 if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1) 696 if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1)
697 return frame_unwind_got_memory (this_frame, regnum, 697 return frame_unwind_got_memory (this_frame, regnum,
698@@ -2254,8 +2240,8 @@ sh_return_in_first_hidden_param_p (struc 698@@ -2255,8 +2241,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
699 static struct gdbarch * 699 static struct gdbarch *
700 sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 700 sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
701 { 701 {
@@ -703,9 +703,9 @@ Index: gdb-8.1/gdb/sh-tdep.c
703 struct gdbarch_tdep *tdep; 703 struct gdbarch_tdep *tdep;
704+ struct gdbarch *gdbarch; 704+ struct gdbarch *gdbarch;
705 705
706 /* SH5 is handled entirely in sh64-tdep.c. */ 706 /* If there is already a candidate, use it. */
707 if (info.bfd_arch_info->mach == bfd_mach_sh5) 707 arches = gdbarch_list_lookup_by_info (arches, &info);
708@@ -2271,6 +2257,18 @@ sh_gdbarch_init (struct gdbarch_info inf 708@@ -2268,6 +2254,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
709 tdep = XCNEW (struct gdbarch_tdep); 709 tdep = XCNEW (struct gdbarch_tdep);
710 gdbarch = gdbarch_alloc (&info, tdep); 710 gdbarch = gdbarch_alloc (&info, tdep);
711 711
@@ -724,7 +724,7 @@ Index: gdb-8.1/gdb/sh-tdep.c
724 set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT); 724 set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
725 set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT); 725 set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
726 set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT); 726 set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
727@@ -2425,10 +2423,11 @@ sh_gdbarch_init (struct gdbarch_info inf 727@@ -2422,10 +2420,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
728 break; 728 break;
729 } 729 }
730 730
@@ -737,10 +737,10 @@ Index: gdb-8.1/gdb/sh-tdep.c
737 frame_unwind_append_unwinder (gdbarch, &sh_stub_unwind); 737 frame_unwind_append_unwinder (gdbarch, &sh_stub_unwind);
738 frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind); 738 frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind);
739 739
740Index: gdb-8.1/gdb/sh-tdep.h 740diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h
741=================================================================== 741index 59acd35b88..be3f998d84 100644
742--- gdb-8.1.orig/gdb/sh-tdep.h 742--- a/gdb/sh-tdep.h
743+++ gdb-8.1/gdb/sh-tdep.h 743+++ b/gdb/sh-tdep.h
744@@ -21,6 +21,12 @@ 744@@ -21,6 +21,12 @@
745 745
746 /* Contributed by Steve Chamberlain sac@cygnus.com. */ 746 /* Contributed by Steve Chamberlain sac@cygnus.com. */
@@ -820,10 +820,10 @@ Index: gdb-8.1/gdb/sh-tdep.h
820 /* Non-NULL when debugging from a core file. Provides the offset 820 /* Non-NULL when debugging from a core file. Provides the offset
821 where each general-purpose register is stored inside the associated 821 where each general-purpose register is stored inside the associated
822 core file section. */ 822 core file section. */
823Index: gdb-8.1/gdb/testsuite/gdb.asm/asm-source.exp 823diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
824=================================================================== 824index 9879f0ca47..cbc0e4d5f7 100644
825--- gdb-8.1.orig/gdb/testsuite/gdb.asm/asm-source.exp 825--- a/gdb/testsuite/gdb.asm/asm-source.exp
826+++ gdb-8.1/gdb/testsuite/gdb.asm/asm-source.exp 826+++ b/gdb/testsuite/gdb.asm/asm-source.exp
827@@ -116,6 +116,11 @@ switch -glob -- [istarget] { 827@@ -116,6 +116,11 @@ switch -glob -- [istarget] {
828 append link-flags " -m elf32ppc" 828 append link-flags " -m elf32ppc"
829 } 829 }
@@ -836,10 +836,10 @@ Index: gdb-8.1/gdb/testsuite/gdb.asm/asm-source.exp
836 "sh*-*-*" { 836 "sh*-*-*" {
837 set asm-arch sh 837 set asm-arch sh
838 set debug-flags "-gdwarf-2" 838 set debug-flags "-gdwarf-2"
839Index: gdb-8.1/gdb/testsuite/gdb.asm/sh.inc 839diff --git a/gdb/testsuite/gdb.asm/sh.inc b/gdb/testsuite/gdb.asm/sh.inc
840=================================================================== 840index a4a5fc545e..89efed7795 100644
841--- gdb-8.1.orig/gdb/testsuite/gdb.asm/sh.inc 841--- a/gdb/testsuite/gdb.asm/sh.inc
842+++ gdb-8.1/gdb/testsuite/gdb.asm/sh.inc 842+++ b/gdb/testsuite/gdb.asm/sh.inc
843@@ -40,9 +40,8 @@ 843@@ -40,9 +40,8 @@
844 mov.l .Lconst\@,r1 844 mov.l .Lconst\@,r1
845 bra .Lafterconst\@ 845 bra .Lafterconst\@
@@ -851,10 +851,10 @@ Index: gdb-8.1/gdb/testsuite/gdb.asm/sh.inc
851 .long \subr 851 .long \subr
852 .align 1 852 .align 1
853 .Lafterconst\@: 853 .Lafterconst\@:
854Index: gdb-8.1/gdb/testsuite/gdb.base/annota1.c 854diff --git a/gdb/testsuite/gdb.base/annota1.c b/gdb/testsuite/gdb.base/annota1.c
855=================================================================== 855index 424e1b8327..0de2e7b633 100644
856--- gdb-8.1.orig/gdb/testsuite/gdb.base/annota1.c 856--- a/gdb/testsuite/gdb.base/annota1.c
857+++ gdb-8.1/gdb/testsuite/gdb.base/annota1.c 857+++ b/gdb/testsuite/gdb.base/annota1.c
858@@ -1,6 +1,9 @@ 858@@ -1,6 +1,9 @@
859 #include <stdio.h> 859 #include <stdio.h>
860 #include <signal.h> 860 #include <signal.h>
@@ -865,10 +865,10 @@ Index: gdb-8.1/gdb/testsuite/gdb.base/annota1.c
865 865
866 void 866 void
867 handle_USR1 (int sig) 867 handle_USR1 (int sig)
868Index: gdb-8.1/gdb/testsuite/gdb.base/annota3.c 868diff --git a/gdb/testsuite/gdb.base/annota3.c b/gdb/testsuite/gdb.base/annota3.c
869=================================================================== 869index 424e1b8327..952aaf218a 100644
870--- gdb-8.1.orig/gdb/testsuite/gdb.base/annota3.c 870--- a/gdb/testsuite/gdb.base/annota3.c
871+++ gdb-8.1/gdb/testsuite/gdb.base/annota3.c 871+++ b/gdb/testsuite/gdb.base/annota3.c
872@@ -1,6 +1,10 @@ 872@@ -1,6 +1,10 @@
873 #include <stdio.h> 873 #include <stdio.h>
874 #include <signal.h> 874 #include <signal.h>
@@ -880,10 +880,10 @@ Index: gdb-8.1/gdb/testsuite/gdb.base/annota3.c
880 880
881 void 881 void
882 handle_USR1 (int sig) 882 handle_USR1 (int sig)
883Index: gdb-8.1/gdb/testsuite/gdb.base/sigall.c 883diff --git a/gdb/testsuite/gdb.base/sigall.c b/gdb/testsuite/gdb.base/sigall.c
884=================================================================== 884index 81f3b08d6b..1574b2d6cb 100644
885--- gdb-8.1.orig/gdb/testsuite/gdb.base/sigall.c 885--- a/gdb/testsuite/gdb.base/sigall.c
886+++ gdb-8.1/gdb/testsuite/gdb.base/sigall.c 886+++ b/gdb/testsuite/gdb.base/sigall.c
887@@ -1,6 +1,9 @@ 887@@ -1,6 +1,9 @@
888 #include <signal.h> 888 #include <signal.h>
889 #include <unistd.h> 889 #include <unistd.h>
@@ -894,10 +894,10 @@ Index: gdb-8.1/gdb/testsuite/gdb.base/sigall.c
894 894
895 /* Signal handlers, we set breakpoints in them to make sure that the 895 /* Signal handlers, we set breakpoints in them to make sure that the
896 signals really get delivered. */ 896 signals really get delivered. */
897Index: gdb-8.1/gdb/testsuite/gdb.base/signals.c 897diff --git a/gdb/testsuite/gdb.base/signals.c b/gdb/testsuite/gdb.base/signals.c
898=================================================================== 898index 756606880f..1205a9bc9c 100644
899--- gdb-8.1.orig/gdb/testsuite/gdb.base/signals.c 899--- a/gdb/testsuite/gdb.base/signals.c
900+++ gdb-8.1/gdb/testsuite/gdb.base/signals.c 900+++ b/gdb/testsuite/gdb.base/signals.c
901@@ -3,6 +3,10 @@ 901@@ -3,6 +3,10 @@
902 #include <signal.h> 902 #include <signal.h>
903 #include <unistd.h> 903 #include <unistd.h>
@@ -909,3 +909,6 @@ Index: gdb-8.1/gdb/testsuite/gdb.base/signals.c
909 909
910 static int count = 0; 910 static int count = 0;
911 911
912--
9132.18.0
914