public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb: fix sparc build failure of linux-nat
@ 2021-04-26  6:24 Sergei Trofimovich
  0 siblings, 0 replies; only message in thread
From: Sergei Trofimovich @ 2021-04-26  6:24 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c290cb01face96fa9c2a4f96f7d57083da3c99f1

commit c290cb01face96fa9c2a4f96f7d57083da3c99f1
Author: Sergei Trofimovich <siarheit@google.com>
Date:   Sun Apr 25 20:50:38 2021 +0100

    gdb: fix sparc build failure of linux-nat
    
    On sparc build failed as:
    
    ```
    gdb/sparc-linux-nat.c: In member function
      'virtual void sparc_linux_nat_target::fetch_registers(regcache*, int)':
    gdb/sparc-linux-nat.c:36:37:
      error: cannot convert 'regcache*' to 'process_stratum_target*'
       36 |   { sparc_fetch_inferior_registers (regcache, regnum); }
          |                                     ^~~~~~~~
          |                                     |
          |                                     regcache*
    ```
    
    The fix adopts gdb/sparc-nat.h API change in d1e93af64a6
    ("gdb: set current thread in sparc_{fetch,collect}_inferior_registers").
    
    gdb/ChangeLog:
    
            * sparc-linux-nat.c (sparc_linux_nat_target): fix sparc build
            by passing `process_stratum_target*` parameter.

Diff:
---
 gdb/ChangeLog         | 5 +++++
 gdb/sparc-linux-nat.c | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fef76a0d9da..2fc74f5592a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2021-04-25  Sergei Trofimovich  <siarheit@google.com>
+
+	* sparc-linux-nat.c (sparc_linux_nat_target): fix sparc build
+	by passing `process_stratum_target*` parameter.
+
 2021-04-25  Lancelot Six  <lsix@lancelotsix.com>
 
 	PR gdb/22640
diff --git a/gdb/sparc-linux-nat.c b/gdb/sparc-linux-nat.c
index c644d441228..33a17afa21e 100644
--- a/gdb/sparc-linux-nat.c
+++ b/gdb/sparc-linux-nat.c
@@ -33,10 +33,10 @@ class sparc_linux_nat_target final : public linux_nat_target
 public:
   /* Add our register access methods.  */
   void fetch_registers (struct regcache *regcache, int regnum) override
-  { sparc_fetch_inferior_registers (regcache, regnum); }
+  { sparc_fetch_inferior_registers (this, regcache, regnum); }
 
   void store_registers (struct regcache *regcache, int regnum) override
-  { sparc_store_inferior_registers (regcache, regnum); }
+  { sparc_store_inferior_registers (this, regcache, regnum); }
 };
 
 static sparc_linux_nat_target the_sparc_linux_nat_target;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-26  6:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-26  6:24 [binutils-gdb] gdb: fix sparc build failure of linux-nat Sergei Trofimovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).