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.patch57
1 files changed, 29 insertions, 28 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 d0c15f6289..cb1b7abd07 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 6649e2cccfb11dec076abb02eae0afab95614829 Mon Sep 17 00:00:00 2001 1From 60ac68f601885ea6480229a5c8a89a0257da376c 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/10] Add support for Renesas SH (sh4) architecture. 4Subject: [PATCH 05/10] Add support for Renesas SH (sh4) architecture.
@@ -13,7 +13,7 @@ Bug-Debian: http://bugs.debian.org/576242
13Upstream-Status: Pending 13Upstream-Status: Pending
14Signed-off-by: Khem Raj <raj.khem@gmail.com> 14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15--- 15---
16 gdb/Makefile.in | 1 + 16 gdb/Makefile.in | 2 +
17 gdb/configure.host | 1 + 17 gdb/configure.host | 1 +
18 gdb/sh-linux-tdep.c | 519 +++++++++++++++++++++++++++++++++++ 18 gdb/sh-linux-tdep.c | 519 +++++++++++++++++++++++++++++++++++
19 gdb/sh-tdep.c | 54 ++-- 19 gdb/sh-tdep.c | 54 ++--
@@ -24,25 +24,26 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
24 gdb/testsuite/gdb.base/annota3.c | 4 + 24 gdb/testsuite/gdb.base/annota3.c | 4 +
25 gdb/testsuite/gdb.base/sigall.c | 3 + 25 gdb/testsuite/gdb.base/sigall.c | 3 +
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, 618 insertions(+), 29 deletions(-)
28 28
29diff --git a/gdb/Makefile.in b/gdb/Makefile.in 29diff --git a/gdb/Makefile.in b/gdb/Makefile.in
30index 7b2df86878..10f1266fe3 100644 30index 8be73ba423..e287ff6a2e 100644
31--- a/gdb/Makefile.in 31--- a/gdb/Makefile.in
32+++ b/gdb/Makefile.in 32+++ b/gdb/Makefile.in
33@@ -1750,6 +1750,7 @@ ALLDEPFILES = \ 33@@ -2638,6 +2638,8 @@ ALLDEPFILES = \
34 score-tdep.c \ 34 sh-nbsd-tdep.c \
35 ser-go32.c ser-pipe.c ser-tcp.c ser-mingw.c \ 35 sh-tdep.c \
36 sh-tdep.c sh64-tdep.c shnbsd-tdep.c shnbsd-nat.c \ 36 sh64-tdep.c \
37+ sh-linux-tdep.c sh-linux-nat.c \ 37+ sh-linux-tdep.c \
38+ sh-linux-nat.c \
38 sol2-tdep.c \ 39 sol2-tdep.c \
39 solib-svr4.c \ 40 solib-aix.c \
40 sparc-linux-nat.c sparc-linux-tdep.c \ 41 solib-spu.c \
41diff --git a/gdb/configure.host b/gdb/configure.host 42diff --git a/gdb/configure.host b/gdb/configure.host
42index ef265ebe29..322a1e2c67 100644 43index d74fd04934..be12de1446 100644
43--- a/gdb/configure.host 44--- a/gdb/configure.host
44+++ b/gdb/configure.host 45+++ b/gdb/configure.host
45@@ -149,6 +149,7 @@ powerpc*-*-linux*) gdb_host=linux ;; 46@@ -150,6 +150,7 @@ powerpc*-*-linux*) gdb_host=linux ;;
46 47
47 s390*-*-linux*) gdb_host=linux ;; 48 s390*-*-linux*) gdb_host=linux ;;
48 49
@@ -51,7 +52,7 @@ index ef265ebe29..322a1e2c67 100644
51 gdb_host=nbsd ;; 52 gdb_host=nbsd ;;
52 sh*-*-openbsd*) gdb_host=nbsd ;; 53 sh*-*-openbsd*) gdb_host=nbsd ;;
53diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c 54diff --git a/gdb/sh-linux-tdep.c b/gdb/sh-linux-tdep.c
54index 2418d25010..ac8ea9e2a4 100644 55index c5c745d218..84e539aad3 100644
55--- a/gdb/sh-linux-tdep.c 56--- a/gdb/sh-linux-tdep.c
56+++ b/gdb/sh-linux-tdep.c 57+++ b/gdb/sh-linux-tdep.c
57@@ -18,14 +18,37 @@ 58@@ -18,14 +18,37 @@
@@ -599,7 +600,7 @@ index 2418d25010..ac8ea9e2a4 100644
599 600
600 /* GNU/Linux uses SVR4-style shared libraries. */ 601 /* GNU/Linux uses SVR4-style shared libraries. */
601diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c 602diff --git a/gdb/sh-tdep.c b/gdb/sh-tdep.c
602index 694f5f742d..8d54df7a1a 100644 603index 2c2b26847d..14f5281ed4 100644
603--- a/gdb/sh-tdep.c 604--- a/gdb/sh-tdep.c
604+++ b/gdb/sh-tdep.c 605+++ b/gdb/sh-tdep.c
605@@ -21,6 +21,9 @@ 606@@ -21,6 +21,9 @@
@@ -620,7 +621,7 @@ index 694f5f742d..8d54df7a1a 100644
620 #include "doublest.h" 621 #include "doublest.h"
621 #include "osabi.h" 622 #include "osabi.h"
622 #include "reggroups.h" 623 #include "reggroups.h"
623@@ -67,23 +71,6 @@ static const char *const sh_cc_enum[] = { 624@@ -68,23 +72,6 @@ static const char *const sh_cc_enum[] = {
624 625
625 static const char *sh_active_calling_convention = sh_cc_gcc; 626 static const char *sh_active_calling_convention = sh_cc_gcc;
626 627
@@ -644,7 +645,7 @@ index 694f5f742d..8d54df7a1a 100644
644 static int 645 static int
645 sh_is_renesas_calling_convention (struct type *func_type) 646 sh_is_renesas_calling_convention (struct type *func_type)
646 { 647 {
647@@ -1043,7 +1030,7 @@ sh_treat_as_flt_p (struct type *type) 648@@ -1052,7 +1039,7 @@ sh_treat_as_flt_p (struct type *type)
648 return 0; 649 return 0;
649 /* Otherwise if the type of that member is float, the whole type is 650 /* Otherwise if the type of that member is float, the whole type is
650 treated as float. */ 651 treated as float. */
@@ -653,7 +654,7 @@ index 694f5f742d..8d54df7a1a 100644
653 return 1; 654 return 1;
654 /* Otherwise it's not treated as float. */ 655 /* Otherwise it's not treated as float. */
655 return 0; 656 return 0;
656@@ -1093,7 +1080,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch, 657@@ -1102,7 +1089,7 @@ sh_push_dummy_call_fpu (struct gdbarch *gdbarch,
657 in four registers available. Loop thru args from first to last. */ 658 in four registers available. Loop thru args from first to last. */
658 for (argnum = 0; argnum < nargs; argnum++) 659 for (argnum = 0; argnum < nargs; argnum++)
659 { 660 {
@@ -662,7 +663,7 @@ index 694f5f742d..8d54df7a1a 100644
662 len = TYPE_LENGTH (type); 663 len = TYPE_LENGTH (type);
663 val = sh_justify_value_in_reg (gdbarch, args[argnum], len); 664 val = sh_justify_value_in_reg (gdbarch, args[argnum], len);
664 665
665@@ -1819,7 +1806,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum, 666@@ -1828,7 +1815,7 @@ sh_dwarf2_frame_init_reg (struct gdbarch *gdbarch, int regnum,
666 reg->how = DWARF2_FRAME_REG_UNDEFINED; 667 reg->how = DWARF2_FRAME_REG_UNDEFINED;
667 } 668 }
668 669
@@ -671,7 +672,7 @@ index 694f5f742d..8d54df7a1a 100644
671 sh_alloc_frame_cache (void) 672 sh_alloc_frame_cache (void)
672 { 673 {
673 struct sh_frame_cache *cache; 674 struct sh_frame_cache *cache;
674@@ -1846,7 +1833,7 @@ sh_alloc_frame_cache (void) 675@@ -1855,7 +1842,7 @@ sh_alloc_frame_cache (void)
675 return cache; 676 return cache;
676 } 677 }
677 678
@@ -680,7 +681,7 @@ index 694f5f742d..8d54df7a1a 100644
680 sh_frame_cache (struct frame_info *this_frame, void **this_cache) 681 sh_frame_cache (struct frame_info *this_frame, void **this_cache)
681 { 682 {
682 struct gdbarch *gdbarch = get_frame_arch (this_frame); 683 struct gdbarch *gdbarch = get_frame_arch (this_frame);
683@@ -1913,9 +1900,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache) 684@@ -1922,9 +1909,9 @@ sh_frame_cache (struct frame_info *this_frame, void **this_cache)
684 return cache; 685 return cache;
685 } 686 }
686 687
@@ -693,7 +694,7 @@ index 694f5f742d..8d54df7a1a 100644
693 { 694 {
694 struct gdbarch *gdbarch = get_frame_arch (this_frame); 695 struct gdbarch *gdbarch = get_frame_arch (this_frame);
695 struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache); 696 struct sh_frame_cache *cache = sh_frame_cache (this_frame, this_cache);
696@@ -1929,7 +1916,7 @@ sh_frame_prev_register (struct frame_info *this_frame, 697@@ -1938,7 +1925,7 @@ sh_frame_prev_register (struct frame_info *this_frame,
697 the current frame. Frob regnum so that we pull the value from 698 the current frame. Frob regnum so that we pull the value from
698 the correct place. */ 699 the correct place. */
699 if (regnum == gdbarch_pc_regnum (gdbarch)) 700 if (regnum == gdbarch_pc_regnum (gdbarch))
@@ -702,7 +703,7 @@ index 694f5f742d..8d54df7a1a 100644
702 703
703 if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1) 704 if (regnum < SH_NUM_REGS && cache->saved_regs[regnum] != -1)
704 return frame_unwind_got_memory (this_frame, regnum, 705 return frame_unwind_got_memory (this_frame, regnum,
705@@ -2238,8 +2225,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch, 706@@ -2247,8 +2234,8 @@ sh_return_in_first_hidden_param_p (struct gdbarch *gdbarch,
706 static struct gdbarch * 707 static struct gdbarch *
707 sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 708 sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
708 { 709 {
@@ -712,7 +713,7 @@ index 694f5f742d..8d54df7a1a 100644
712 713
713 /* SH5 is handled entirely in sh64-tdep.c. */ 714 /* SH5 is handled entirely in sh64-tdep.c. */
714 if (info.bfd_arch_info->mach == bfd_mach_sh5) 715 if (info.bfd_arch_info->mach == bfd_mach_sh5)
715@@ -2255,6 +2242,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 716@@ -2264,6 +2251,18 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
716 tdep = XCNEW (struct gdbarch_tdep); 717 tdep = XCNEW (struct gdbarch_tdep);
717 gdbarch = gdbarch_alloc (&info, tdep); 718 gdbarch = gdbarch_alloc (&info, tdep);
718 719
@@ -731,7 +732,7 @@ index 694f5f742d..8d54df7a1a 100644
731 set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT); 732 set_gdbarch_short_bit (gdbarch, 2 * TARGET_CHAR_BIT);
732 set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT); 733 set_gdbarch_int_bit (gdbarch, 4 * TARGET_CHAR_BIT);
733 set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT); 734 set_gdbarch_long_bit (gdbarch, 4 * TARGET_CHAR_BIT);
734@@ -2405,10 +2404,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) 735@@ -2418,10 +2417,11 @@ sh_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
735 break; 736 break;
736 } 737 }
737 738
@@ -745,7 +746,7 @@ index 694f5f742d..8d54df7a1a 100644
745 frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind); 746 frame_unwind_append_unwinder (gdbarch, &sh_frame_unwind);
746 747
747diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h 748diff --git a/gdb/sh-tdep.h b/gdb/sh-tdep.h
748index 666968f787..62c65b55ea 100644 749index d15ef050e0..c4642cefa4 100644
749--- a/gdb/sh-tdep.h 750--- a/gdb/sh-tdep.h
750+++ b/gdb/sh-tdep.h 751+++ b/gdb/sh-tdep.h
751@@ -21,6 +21,12 @@ 752@@ -21,6 +21,12 @@
@@ -828,7 +829,7 @@ index 666968f787..62c65b55ea 100644
828 where each general-purpose register is stored inside the associated 829 where each general-purpose register is stored inside the associated
829 core file section. */ 830 core file section. */
830diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp 831diff --git a/gdb/testsuite/gdb.asm/asm-source.exp b/gdb/testsuite/gdb.asm/asm-source.exp
831index 6d9aef81bb..5b66b429d1 100644 832index e07e5543f2..f5e60e1002 100644
832--- a/gdb/testsuite/gdb.asm/asm-source.exp 833--- a/gdb/testsuite/gdb.asm/asm-source.exp
833+++ b/gdb/testsuite/gdb.asm/asm-source.exp 834+++ b/gdb/testsuite/gdb.asm/asm-source.exp
834@@ -116,6 +116,11 @@ switch -glob -- [istarget] { 835@@ -116,6 +116,11 @@ switch -glob -- [istarget] {
@@ -917,5 +918,5 @@ index 756606880f..1205a9bc9c 100644
917 static int count = 0; 918 static int count = 0;
918 919
919-- 920--
9202.11.0 9212.13.1
921 922