diff options
Diffstat (limited to 'meta-microblaze/recipes-devtools/binutils/binutils/0041-patch-MicroBlaze-porting-GDB-for-linux.patch')
-rw-r--r-- | meta-microblaze/recipes-devtools/binutils/binutils/0041-patch-MicroBlaze-porting-GDB-for-linux.patch | 155 |
1 files changed, 0 insertions, 155 deletions
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0041-patch-MicroBlaze-porting-GDB-for-linux.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0041-patch-MicroBlaze-porting-GDB-for-linux.patch deleted file mode 100644 index 1a0153b8..00000000 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0041-patch-MicroBlaze-porting-GDB-for-linux.patch +++ /dev/null | |||
@@ -1,155 +0,0 @@ | |||
1 | From 07757f455d343beb50ac04815c77b04075bf9534 Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Thu, 12 Dec 2019 14:56:17 +0530 | ||
4 | Subject: [PATCH 41/43] [patch,MicroBlaze] : porting GDB for linux | ||
5 | |||
6 | --- | ||
7 | gdb/features/microblaze-linux.xml | 12 ++++++++++ | ||
8 | gdb/gdbserver/Makefile.in | 2 ++ | ||
9 | gdb/gdbserver/configure.srv | 3 ++- | ||
10 | gdb/microblaze-linux-tdep.c | 39 ++++++++++++++++++++++++------- | ||
11 | 4 files changed, 47 insertions(+), 9 deletions(-) | ||
12 | create mode 100644 gdb/features/microblaze-linux.xml | ||
13 | |||
14 | diff --git a/gdb/features/microblaze-linux.xml b/gdb/features/microblaze-linux.xml | ||
15 | new file mode 100644 | ||
16 | index 0000000000..8983e66eb3 | ||
17 | --- /dev/null | ||
18 | +++ b/gdb/features/microblaze-linux.xml | ||
19 | @@ -0,0 +1,12 @@ | ||
20 | +<?xml version="1.0"?> | ||
21 | +<!-- Copyright (C) 2014-2018 Free Software Foundation, Inc. | ||
22 | + | ||
23 | + Copying and distribution of this file, with or without modification, | ||
24 | + are permitted in any medium without royalty provided the copyright | ||
25 | + notice and this notice are preserved. --> | ||
26 | + | ||
27 | +<!DOCTYPE target SYSTEM "gdb-target.dtd"> | ||
28 | +<target> | ||
29 | + <osabi>GNU/Linux</osabi> | ||
30 | + <xi:include href="microblaze-core.xml"/> | ||
31 | +</target> | ||
32 | diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in | ||
33 | index 45d95e6cab..7c8fa3c246 100644 | ||
34 | --- a/gdb/gdbserver/Makefile.in | ||
35 | +++ b/gdb/gdbserver/Makefile.in | ||
36 | @@ -633,6 +633,8 @@ common/%.o: ../common/%.c | ||
37 | |||
38 | %-generated.c: ../regformats/rs6000/%.dat | $(regdat_sh) | ||
39 | $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $< $@ | ||
40 | +microblaze-linux.c : $(srcdir)/../regformats/reg-microblaze.dat $(regdat_sh) | ||
41 | + $(ECHO_REGDAT) $(SHELL) $(regdat_sh) $(srcdir)/../regformats/reg-microblaze.dat microblaze-linux.c | ||
42 | |||
43 | # | ||
44 | # Dependency tracking. | ||
45 | diff --git a/gdb/gdbserver/configure.srv b/gdb/gdbserver/configure.srv | ||
46 | index c421790bd0..6ad0ac9fa6 100644 | ||
47 | --- a/gdb/gdbserver/configure.srv | ||
48 | +++ b/gdb/gdbserver/configure.srv | ||
49 | @@ -210,8 +210,9 @@ case "${target}" in | ||
50 | srv_linux_usrregs=yes | ||
51 | srv_linux_thread_db=yes | ||
52 | ;; | ||
53 | - microblaze*-*-linux*) srv_regobj=microblaze-linux.o | ||
54 | + microblaze*-*-linux*) srv_regobj="microblaze-linux.o" | ||
55 | srv_tgtobj="$srv_linux_obj linux-microblaze-low.o " | ||
56 | + srv_xmlfiles="microblaze-linux.xml" | ||
57 | srv_linux_regsets=yes | ||
58 | srv_linux_usrregs=yes | ||
59 | srv_linux_thread_db=yes | ||
60 | diff --git a/gdb/microblaze-linux-tdep.c b/gdb/microblaze-linux-tdep.c | ||
61 | index 011e513941..e3d2a7508d 100644 | ||
62 | --- a/gdb/microblaze-linux-tdep.c | ||
63 | +++ b/gdb/microblaze-linux-tdep.c | ||
64 | @@ -41,7 +41,7 @@ | ||
65 | |||
66 | #ifndef REGSET_H | ||
67 | #define REGSET_H 1 | ||
68 | - | ||
69 | +int MICROBLAZE_REGISTER_SIZE=4; | ||
70 | struct gdbarch; | ||
71 | struct regcache; | ||
72 | |||
73 | @@ -115,7 +115,7 @@ microblaze_debug (const char *fmt, ...) | ||
74 | va_end (args); | ||
75 | } | ||
76 | } | ||
77 | - | ||
78 | +#if 0 | ||
79 | static int | ||
80 | microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
81 | struct bp_target_info *bp_tgt) | ||
82 | @@ -131,7 +131,7 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
83 | bp = gdbarch_breakpoint_from_pc (gdbarch, &addr, &bplen); | ||
84 | |||
85 | /* Make sure we see the memory breakpoints. */ | ||
86 | - cleanup = make_show_memory_breakpoints_cleanup (1); | ||
87 | + cleanup = make_scoped_restore_show_memory_breakpoints (1); | ||
88 | val = target_read_memory (addr, old_contents, bplen); | ||
89 | |||
90 | /* If our breakpoint is no longer at the address, this means that the | ||
91 | @@ -146,6 +146,7 @@ microblaze_linux_memory_remove_breakpoint (struct gdbarch *gdbarch, | ||
92 | do_cleanups (cleanup); | ||
93 | return val; | ||
94 | } | ||
95 | +#endif | ||
96 | |||
97 | static void | ||
98 | microblaze_linux_sigtramp_cache (struct frame_info *next_frame, | ||
99 | @@ -248,8 +249,8 @@ microblaze_linux_init_abi (struct gdbarch_info info, | ||
100 | |||
101 | linux_init_abi (info, gdbarch); | ||
102 | |||
103 | - set_gdbarch_memory_remove_breakpoint (gdbarch, | ||
104 | - microblaze_linux_memory_remove_breakpoint); | ||
105 | +// set_gdbarch_memory_remove_breakpoint (gdbarch, | ||
106 | +// microblaze_linux_memory_remove_breakpoint); | ||
107 | |||
108 | /* Shared library handling. */ | ||
109 | set_solib_svr4_fetch_link_map_offsets (gdbarch, | ||
110 | @@ -261,10 +262,30 @@ microblaze_linux_init_abi (struct gdbarch_info info, | ||
111 | |||
112 | /* BFD target for core files. */ | ||
113 | if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG) | ||
114 | - set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblaze"); | ||
115 | + { | ||
116 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) { | ||
117 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf64-microblaze"); | ||
118 | + MICROBLAZE_REGISTER_SIZE=8; | ||
119 | + } | ||
120 | + else | ||
121 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblaze"); | ||
122 | + } | ||
123 | else | ||
124 | - set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblazeel"); | ||
125 | + { | ||
126 | + if (info.bfd_arch_info->mach == bfd_mach_microblaze64) { | ||
127 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf64-microblazeel"); | ||
128 | + MICROBLAZE_REGISTER_SIZE=8; | ||
129 | + } | ||
130 | + else | ||
131 | + set_gdbarch_gcore_bfd_target (gdbarch, "elf32-microblazeel"); | ||
132 | + } | ||
133 | |||
134 | + switch (info.bfd_arch_info->mach) | ||
135 | + { | ||
136 | + case bfd_mach_microblaze64: | ||
137 | + set_gdbarch_ptr_bit (gdbarch, 64); | ||
138 | + break; | ||
139 | + } | ||
140 | |||
141 | /* Shared library handling. */ | ||
142 | set_gdbarch_skip_trampoline_code (gdbarch, find_solib_trampoline_target); | ||
143 | @@ -278,6 +299,8 @@ microblaze_linux_init_abi (struct gdbarch_info info, | ||
144 | void | ||
145 | _initialize_microblaze_linux_tdep (void) | ||
146 | { | ||
147 | - gdbarch_register_osabi (bfd_arch_microblaze, 0, GDB_OSABI_LINUX, | ||
148 | + gdbarch_register_osabi (bfd_arch_microblaze, bfd_mach_microblaze, GDB_OSABI_LINUX, | ||
149 | + microblaze_linux_init_abi); | ||
150 | + gdbarch_register_osabi (bfd_arch_microblaze, bfd_mach_microblaze64, GDB_OSABI_LINUX, | ||
151 | microblaze_linux_init_abi); | ||
152 | } | ||
153 | -- | ||
154 | 2.17.1 | ||
155 | |||