diff options
author | Mark Hatle <mark.hatle@amd.com> | 2024-11-11 11:24:08 -0700 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2024-11-11 11:24:08 -0700 |
commit | ee6e2f1f4fc8d438bfde7634e31657b52970fda9 (patch) | |
tree | 38b5366d82e15538ab3c5e4f9a3dd1dcac26ff20 /meta-microblaze/recipes-devtools/gdb/gdb/0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch | |
parent | 03d3b2ce359a1c2959f04588cf2c4a1b0dcb4de8 (diff) | |
parent | 7c79383570dc4182bb21cdee68598ccf47403150 (diff) | |
download | meta-xilinx-ee6e2f1f4fc8d438bfde7634e31657b52970fda9.tar.gz |
Merge remote-tracking branch 'origin/rel-v2024.2' into scarthgap-next
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'meta-microblaze/recipes-devtools/gdb/gdb/0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch')
-rw-r--r-- | meta-microblaze/recipes-devtools/gdb/gdb/0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch | 133 |
1 files changed, 133 insertions, 0 deletions
diff --git a/meta-microblaze/recipes-devtools/gdb/gdb/0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch b/meta-microblaze/recipes-devtools/gdb/gdb/0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch new file mode 100644 index 00000000..e5c88f01 --- /dev/null +++ b/meta-microblaze/recipes-devtools/gdb/gdb/0010-Fix-gdb-14-build-errors-for-microblaze-xilinx-elf-20.patch | |||
@@ -0,0 +1,133 @@ | |||
1 | From 6b6632b730808a012738f9eddf621abd6463e317 Mon Sep 17 00:00:00 2001 | ||
2 | From: Gopi Kumar Bulusu <gopi@sankhya.com> | ||
3 | Date: Thu, 29 Feb 2024 10:53:04 +0530 | ||
4 | Subject: [PATCH 10/54] Fix gdb-14 build errors for microblaze-xilinx-elf | ||
5 | 2023.2 merge | ||
6 | |||
7 | Signed-off-by: Aayush Misra <aayushm@amd.com> | ||
8 | --- | ||
9 | bfd/elf64-microblaze.c | 12 ++++++++++++ | ||
10 | gdb/frame.c | 2 +- | ||
11 | gdb/microblaze-tdep.c | 17 +++++++++++------ | ||
12 | 3 files changed, 24 insertions(+), 7 deletions(-) | ||
13 | |||
14 | diff --git a/bfd/elf64-microblaze.c b/bfd/elf64-microblaze.c | ||
15 | index 6cd9753a592..119d266f95a 100755 | ||
16 | --- a/bfd/elf64-microblaze.c | ||
17 | +++ b/bfd/elf64-microblaze.c | ||
18 | @@ -750,6 +750,18 @@ microblaze_elf_info_to_howto (bfd * abfd, | ||
19 | return true; | ||
20 | } | ||
21 | |||
22 | +/* Relax table contains information about instructions which can | ||
23 | + be removed by relaxation -- replacing a long address with a | ||
24 | + short address. */ | ||
25 | +struct relax_table | ||
26 | +{ | ||
27 | + /* Address where bytes may be deleted. */ | ||
28 | + bfd_vma addr; | ||
29 | + | ||
30 | + /* Number of bytes to be deleted. */ | ||
31 | + size_t size; | ||
32 | +}; | ||
33 | + | ||
34 | struct _microblaze_elf_section_data | ||
35 | { | ||
36 | struct bfd_elf_section_data elf; | ||
37 | diff --git a/gdb/frame.c b/gdb/frame.c | ||
38 | index c4d967e01d5..8be230e0617 100644 | ||
39 | --- a/gdb/frame.c | ||
40 | +++ b/gdb/frame.c | ||
41 | @@ -1315,7 +1315,7 @@ frame_unwind_register_value (frame_info_ptr next_frame, int regnum) | ||
42 | int i; | ||
43 | |||
44 | const gdb_byte *buf = NULL; | ||
45 | - if (value_entirely_available(value)) { | ||
46 | + if (value->entirely_available()) { | ||
47 | gdb::array_view<const gdb_byte> buf = value->contents (); | ||
48 | } | ||
49 | |||
50 | diff --git a/gdb/microblaze-tdep.c b/gdb/microblaze-tdep.c | ||
51 | index 3e541789fac..f7d9d6419ce 100644 | ||
52 | --- a/gdb/microblaze-tdep.c | ||
53 | +++ b/gdb/microblaze-tdep.c | ||
54 | @@ -75,7 +75,7 @@ static const char *const microblaze_abi_strings[] = { | ||
55 | enum microblaze_abi | ||
56 | microblaze_abi (struct gdbarch *gdbarch) | ||
57 | { | ||
58 | - microblaze_gdbarch_tdep *tdep = (microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
59 | + microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
60 | return tdep->microblaze_abi; | ||
61 | } | ||
62 | /* The registers of the Xilinx microblaze processor. */ | ||
63 | @@ -120,12 +120,12 @@ show_microblaze_abi (struct ui_file *file, | ||
64 | |||
65 | #if 1 | ||
66 | if (global_abi == MICROBLAZE_ABI_AUTO) | ||
67 | - fprintf_filtered | ||
68 | + gdb_printf | ||
69 | (file, | ||
70 | "The microblaze ABI is set automatically (currently \"%s\").\n", | ||
71 | actual_abi_str); | ||
72 | else if (global_abi == actual_abi) | ||
73 | - fprintf_filtered | ||
74 | + gdb_printf | ||
75 | (file, | ||
76 | "The microblaze ABI is assumed to be \"%s\" (due to user setting).\n", | ||
77 | actual_abi_str); | ||
78 | @@ -133,7 +133,7 @@ show_microblaze_abi (struct ui_file *file, | ||
79 | { | ||
80 | #endif | ||
81 | /* Probably shouldn't happen... */ | ||
82 | - fprintf_filtered (file, | ||
83 | + gdb_printf (file, | ||
84 | "The (auto detected) microblaze ABI \"%s\" is in use " | ||
85 | "even though the user setting was \"%s\".\n", | ||
86 | actual_abi_str, microblaze_abi_strings[global_abi]); | ||
87 | @@ -934,7 +934,7 @@ microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
88 | void *cb_data, | ||
89 | const struct regcache *regcache) | ||
90 | { | ||
91 | - struct microblaze_gdbarch_tdep *tdep =(microblaze_gdbarch_tdep *) gdbarch_tdep (gdbarch); | ||
92 | + microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
93 | |||
94 | cb(".reg", tdep->sizeof_gregset, tdep->sizeof_gregset, tdep->gregset, NULL, cb_data); | ||
95 | |||
96 | @@ -942,6 +942,8 @@ microblaze_iterate_over_regset_sections (struct gdbarch *gdbarch, | ||
97 | } | ||
98 | |||
99 | |||
100 | +#if 0 | ||
101 | +// compilation errors - function is not actually used ? | ||
102 | static void | ||
103 | make_regs (struct gdbarch *arch) | ||
104 | { | ||
105 | @@ -953,6 +955,7 @@ make_regs (struct gdbarch *arch) | ||
106 | set_gdbarch_ptr_bit (arch, 64); | ||
107 | } | ||
108 | } | ||
109 | +#endif | ||
110 | |||
111 | static struct gdbarch * | ||
112 | microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
113 | @@ -964,7 +967,7 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
114 | /* What has the user specified from the command line? */ | ||
115 | wanted_abi = global_microblaze_abi (); | ||
116 | if (gdbarch_debug) | ||
117 | - fprintf_unfiltered (gdb_stdlog, "microblaze_gdbarch_init: wanted_abi = %d\n", | ||
118 | + gdb_printf (gdb_stdlog, "microblaze_gdbarch_init: wanted_abi = %d\n", | ||
119 | wanted_abi); | ||
120 | if (wanted_abi != MICROBLAZE_ABI_AUTO) | ||
121 | microblaze_abi = wanted_abi; | ||
122 | @@ -1038,6 +1041,8 @@ microblaze_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches) | ||
123 | gdbarch *gdbarch | ||
124 | = gdbarch_alloc (&info, gdbarch_tdep_up (new microblaze_gdbarch_tdep)); | ||
125 | |||
126 | + microblaze_gdbarch_tdep *tdep = gdbarch_tdep<microblaze_gdbarch_tdep> (gdbarch); | ||
127 | + | ||
128 | tdep->gregset = NULL; | ||
129 | tdep->sizeof_gregset = 0; | ||
130 | tdep->fpregset = NULL; | ||
131 | -- | ||
132 | 2.34.1 | ||
133 | |||