diff options
author | Nathan Rossi <nathan.rossi@xilinx.com> | 2013-12-16 16:48:36 +1000 |
---|---|---|
committer | Nathan Rossi <nathan.rossi@xilinx.com> | 2013-12-16 16:48:36 +1000 |
commit | 74f73159e5c659d8ee52a3d48238932b36e4fe93 (patch) | |
tree | 824b4a830e733161d055a12d6993dc6c8cd45da3 /recipes-devtools/gdb/files/0010-revert-master-rebase-changes-to-gdbserver.patch | |
parent | 3ec0d044ea0c5fca26eecc0335bb9847871255ea (diff) | |
download | meta-xilinx-74f73159e5c659d8ee52a3d48238932b36e4fe93.tar.gz |
gdb: Add MicroBlaze support
* Import Xilinx gdb patches for MicroBlaze
* Disable dependence on LTTng-UST for MicroBlaze, it is not supported
Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Diffstat (limited to 'recipes-devtools/gdb/files/0010-revert-master-rebase-changes-to-gdbserver.patch')
-rw-r--r-- | recipes-devtools/gdb/files/0010-revert-master-rebase-changes-to-gdbserver.patch | 160 |
1 files changed, 160 insertions, 0 deletions
diff --git a/recipes-devtools/gdb/files/0010-revert-master-rebase-changes-to-gdbserver.patch b/recipes-devtools/gdb/files/0010-revert-master-rebase-changes-to-gdbserver.patch new file mode 100644 index 00000000..edd6a5a7 --- /dev/null +++ b/recipes-devtools/gdb/files/0010-revert-master-rebase-changes-to-gdbserver.patch | |||
@@ -0,0 +1,160 @@ | |||
1 | From: David Holsgrove <david.holsgrove@xilinx.com> | ||
2 | Date: Mon, 22 Jul 2013 11:16:05 +1000 | ||
3 | Subject: revert master-rebase changes to gdbserver | ||
4 | |||
5 | Signed-off-by: David Holsgrove <david.holsgrove@xilinx.com> | ||
6 | Upstream-Status: Pending | ||
7 | --- | ||
8 | gdb/gdbserver/Makefile.in | 4 +++ | ||
9 | gdb/gdbserver/configure.srv | 7 +++++ | ||
10 | gdb/gdbserver/linux-microblaze-low.c | 53 +++++----------------------------- | ||
11 | 3 files changed, 18 insertions(+), 46 deletions(-) | ||
12 | |||
13 | diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in | ||
14 | index 08db2cc..aa76959 100644 | ||
15 | --- a/gdb/gdbserver/Makefile.in | ||
16 | +++ b/gdb/gdbserver/Makefile.in | ||
17 | @@ -143,6 +143,7 @@ SFILES= $(srcdir)/gdbreplay.c $(srcdir)/inferiors.c $(srcdir)/dll.c \ | ||
18 | $(srcdir)/linux-ia64-low.c $(srcdir)/linux-low.c \ | ||
19 | $(srcdir)/linux-m32r-low.c \ | ||
20 | $(srcdir)/linux-m68k-low.c $(srcdir)/linux-mips-low.c \ | ||
21 | + $(srcdir)/linux-microblaze-low.c \ | ||
22 | $(srcdir)/linux-ppc-low.c \ | ||
23 | $(srcdir)/linux-s390-low.c \ | ||
24 | $(srcdir)/linux-sh-low.c $(srcdir)/linux-sparc-low.c \ | ||
25 | @@ -336,6 +337,7 @@ clean: | ||
26 | rm -f i386-avx.c i386-avx-linux.c | ||
27 | rm -f amd64-avx.c amd64-avx-linux.c | ||
28 | rm -f i386-mmx.c i386-mmx-linux.c | ||
29 | + rm -f microblaze-linux.c | ||
30 | rm -f x32.c x32-linux.c | ||
31 | rm -f x32-avx.c x32-avx-linux.c | ||
32 | @$(MAKE) $(FLAGS_TO_PASS) DO=$@ "DODIRS=$(SUBDIRS)" subdir_do | ||
33 | @@ -616,6 +618,8 @@ mips64-linux.c : $(srcdir)/../regformats/mips64-linux.dat $(regdat_sh) | ||
34 | $(SHELL) $(regdat_sh) $(srcdir)/../regformats/mips64-linux.dat mips64-linux.c | ||
35 | mips64-dsp-linux.c : $(srcdir)/../regformats/mips64-dsp-linux.dat $(regdat_sh) | ||
36 | $(SHELL) $(regdat_sh) $(srcdir)/../regformats/mips64-dsp-linux.dat mips64-dsp-linux.c | ||
37 | +microblaze-linux.c : $(srcdir)/../regformats/reg-microblaze.dat $(regdat_sh) | ||
38 | + $(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-microblaze.dat microblaze-linux.c | ||
39 | powerpc-32.c : $(srcdir)/../regformats/rs6000/powerpc-32.dat $(regdat_sh) | ||
40 | $(SHELL) $(regdat_sh) $(srcdir)/../regformats/rs6000/powerpc-32.dat powerpc-32.c | ||
41 | powerpc-32l.c : $(srcdir)/../regformats/rs6000/powerpc-32l.dat $(regdat_sh) | ||
42 | diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv | ||
43 | index 271a0fe..57bd3a4c 100644 | ||
44 | --- a/gdb/gdbserver/configure.srv | ||
45 | +++ b/gdb/gdbserver/configure.srv | ||
46 | @@ -201,6 +201,13 @@ case "${target}" in | ||
47 | srv_linux_usrregs=yes | ||
48 | srv_linux_thread_db=yes | ||
49 | ;; | ||
50 | + microblaze*-*-linux*) srv_regobj=microblaze-linux.o | ||
51 | + srv_tgtobj="linux-low.o linux-osdata.o linux-microblaze-low.o " | ||
52 | + srv_tgtobj="${srv_tgtobj} linux-procfs.o linux-ptrace.o" | ||
53 | + srv_linux_regsets=yes | ||
54 | + srv_linux_usrregs=yes | ||
55 | + srv_linux_thread_db=yes | ||
56 | + ;; | ||
57 | powerpc*-*-linux*) srv_regobj="powerpc-32l.o" | ||
58 | srv_regobj="${srv_regobj} powerpc-altivec32l.o" | ||
59 | srv_regobj="${srv_regobj} powerpc-cell32l.o" | ||
60 | diff --git a/gdb/gdbserver/linux-microblaze-low.c b/gdb/gdbserver/linux-microblaze-low.c | ||
61 | index 279df9f..cba5d6f 100644 | ||
62 | --- a/gdb/gdbserver/linux-microblaze-low.c | ||
63 | +++ b/gdb/gdbserver/linux-microblaze-low.c | ||
64 | @@ -43,7 +43,6 @@ static int microblaze_regmap[] = | ||
65 | |||
66 | /* Defined in auto-generated file microblaze-linux.c. */ | ||
67 | void init_registers_microblaze (void); | ||
68 | -extern const struct target_desc *tdesc_microblaze; | ||
69 | |||
70 | static int | ||
71 | microblaze_cannot_store_register (int regno) | ||
72 | @@ -108,7 +107,7 @@ microblaze_reinsert_addr (struct regcache *regcache) | ||
73 | static void | ||
74 | microblaze_collect_ptrace_register (struct regcache *regcache, int regno, char *buf) | ||
75 | { | ||
76 | - int size = register_size (regcache->tdesc, regno); | ||
77 | + int size = register_size (regno); | ||
78 | |||
79 | memset (buf, 0, sizeof (long)); | ||
80 | |||
81 | @@ -122,7 +121,7 @@ static void | ||
82 | microblaze_supply_ptrace_register (struct regcache *regcache, | ||
83 | int regno, const char *buf) | ||
84 | { | ||
85 | - int size = register_size (regcache->tdesc, regno); | ||
86 | + int size = register_size (regno); | ||
87 | |||
88 | if (regno == 0) { | ||
89 | unsigned long regbuf_0 = 0; | ||
90 | @@ -158,7 +157,7 @@ microblaze_store_gregset (struct regcache *regcache, const void *buf) | ||
91 | |||
92 | #endif /* HAVE_PTRACE_GETREGS */ | ||
93 | |||
94 | -static struct regset_info microblaze_regsets[] = { | ||
95 | +struct regset_info target_regsets[] = { | ||
96 | #ifdef HAVE_PTRACE_GETREGS | ||
97 | { PTRACE_GETREGS, PTRACE_SETREGS, 0, sizeof (elf_gregset_t), GENERAL_REGS, microblaze_fill_gregset, microblaze_store_gregset }, | ||
98 | { 0, 0, 0, -1, -1, NULL, NULL }, | ||
99 | @@ -166,41 +165,11 @@ static struct regset_info microblaze_regsets[] = { | ||
100 | { 0, 0, 0, -1, -1, NULL, NULL } | ||
101 | }; | ||
102 | |||
103 | -static struct regsets_info microblaze_regsets_info = | ||
104 | - { | ||
105 | - microblaze_regsets, /* regsets */ | ||
106 | - 0, /* num_regsets */ | ||
107 | - NULL, /* disabled_regsets */ | ||
108 | - }; | ||
109 | - | ||
110 | -static struct usrregs_info microblaze_usrregs_info = | ||
111 | - { | ||
112 | - microblaze_num_regs, | ||
113 | - microblaze_regmap, | ||
114 | - }; | ||
115 | - | ||
116 | -static struct regs_info regs_info = | ||
117 | - { | ||
118 | - NULL, /* regset_bitmap */ | ||
119 | - µblaze_usrregs_info, | ||
120 | - µblaze_regsets_info | ||
121 | - }; | ||
122 | - | ||
123 | -static const struct regs_info * | ||
124 | -microblaze_regs_info (void) | ||
125 | -{ | ||
126 | - return ®s_info; | ||
127 | -} | ||
128 | - | ||
129 | -static void | ||
130 | -microblaze_arch_setup (void) | ||
131 | -{ | ||
132 | - current_process ()->tdesc = tdesc_microblaze; | ||
133 | -} | ||
134 | - | ||
135 | struct linux_target_ops the_low_target = { | ||
136 | - microblaze_arch_setup, | ||
137 | - microblaze_regs_info, | ||
138 | + init_registers_microblaze, | ||
139 | + microblaze_num_regs, | ||
140 | + microblaze_regmap, | ||
141 | + NULL, | ||
142 | microblaze_cannot_fetch_register, | ||
143 | microblaze_cannot_store_register, | ||
144 | NULL, /* fetch_register */ | ||
145 | @@ -218,11 +187,3 @@ struct linux_target_ops the_low_target = { | ||
146 | microblaze_collect_ptrace_register, | ||
147 | microblaze_supply_ptrace_register, | ||
148 | }; | ||
149 | - | ||
150 | -void | ||
151 | -initialize_low_arch (void) | ||
152 | -{ | ||
153 | - init_registers_microblaze (); | ||
154 | - | ||
155 | - initialize_regsets_info (µblaze_regsets_info); | ||
156 | -} | ||
157 | \ No newline at end of file | ||
158 | -- | ||
159 | 1.7.9.5 | ||
160 | |||