1 |
commit: e9d3ab7ee243c49191b72e042128dea375e67305 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 25 20:57:24 2021 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 25 20:57:44 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e9d3ab7e |
7 |
|
8 |
sys-devel/gdb: fix sparc-nat build |
9 |
|
10 |
Package-Manager: Portage-3.0.18, Repoman-3.0.3 |
11 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
12 |
|
13 |
sys-devel/gdb/files/gdb-10.2-sparc-nat.patch | 47 ++++++++++++++++++++++++++++ |
14 |
sys-devel/gdb/gdb-10.2.ebuild | 1 + |
15 |
2 files changed, 48 insertions(+) |
16 |
|
17 |
diff --git a/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch b/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch |
18 |
new file mode 100644 |
19 |
index 00000000000..5e71efa0d33 |
20 |
--- /dev/null |
21 |
+++ b/sys-devel/gdb/files/gdb-10.2-sparc-nat.patch |
22 |
@@ -0,0 +1,47 @@ |
23 |
+From 288e3189fce8f466ca60411c27e8f1c0dac5d582 Mon Sep 17 00:00:00 2001 |
24 |
+From: Sergei Trofimovich <siarheit@××××××.com> |
25 |
+Date: Sun, 25 Apr 2021 20:50:38 +0100 |
26 |
+Subject: [PATCH] gdb: fix sparc build failure of linux-nat |
27 |
+ |
28 |
+On sparc build failed as: |
29 |
+ |
30 |
+``` |
31 |
+gdb/sparc-linux-nat.c: In member function |
32 |
+ 'virtual void sparc_linux_nat_target::fetch_registers(regcache*, int)': |
33 |
+gdb/sparc-linux-nat.c:36:37: |
34 |
+ error: cannot convert 'regcache*' to 'process_stratum_target*' |
35 |
+ 36 | { sparc_fetch_inferior_registers (regcache, regnum); } |
36 |
+ | ^~~~~~~~ |
37 |
+ | | |
38 |
+ | regcache* |
39 |
+``` |
40 |
+ |
41 |
+The fix adopts gdb/sparc-nat.h API change in d1e93af64a6 |
42 |
+("gdb: set current thread in sparc_{fetch,collect}_inferior_registers"). |
43 |
+ |
44 |
+gdb/ChangeLog: |
45 |
+ |
46 |
+ * sparc-linux-nat.c (sparc_linux_nat_target): fix sparc build |
47 |
+ by passing `process_stratum_target*` parameter. |
48 |
+--- |
49 |
+ gdb/sparc-linux-nat.c | 4 ++-- |
50 |
+ 1 file changed, 2 insertions(+), 2 deletions(-) |
51 |
+ |
52 |
+--- a/gdb/sparc-linux-nat.c |
53 |
++++ b/gdb/sparc-linux-nat.c |
54 |
+@@ -33,10 +33,10 @@ class sparc_linux_nat_target final : public linux_nat_target |
55 |
+ public: |
56 |
+ /* Add our register access methods. */ |
57 |
+ void fetch_registers (struct regcache *regcache, int regnum) override |
58 |
+- { sparc_fetch_inferior_registers (regcache, regnum); } |
59 |
++ { sparc_fetch_inferior_registers (this, regcache, regnum); } |
60 |
+ |
61 |
+ void store_registers (struct regcache *regcache, int regnum) override |
62 |
+- { sparc_store_inferior_registers (regcache, regnum); } |
63 |
++ { sparc_store_inferior_registers (this, regcache, regnum); } |
64 |
+ }; |
65 |
+ |
66 |
+ static sparc_linux_nat_target the_sparc_linux_nat_target; |
67 |
+-- |
68 |
+2.31.1 |
69 |
+ |
70 |
|
71 |
diff --git a/sys-devel/gdb/gdb-10.2.ebuild b/sys-devel/gdb/gdb-10.2.ebuild |
72 |
index 520501f0023..f826ccb7083 100644 |
73 |
--- a/sys-devel/gdb/gdb-10.2.ebuild |
74 |
+++ b/sys-devel/gdb/gdb-10.2.ebuild |
75 |
@@ -86,6 +86,7 @@ BDEPEND=" |
76 |
PATCHES=( |
77 |
"${FILESDIR}"/${PN}-8.3.1-verbose-build.patch |
78 |
"${FILESDIR}"/${PN}-10.1-cet.patch |
79 |
+ "${FILESDIR}"/${PN}-10.2-sparc-nat.patch |
80 |
) |
81 |
|
82 |
pkg_setup() { |