From: Simon Marchi <simon.marchi@ericsson.com>
To: <gdb-patches@sourceware.org>
Cc: Simon Marchi <simon.marchi@ericsson.com>
Subject: [pushed] Fix GDB sparc build
Date: Thu, 14 Jun 2018 01:59:00 -0000 [thread overview]
Message-ID: <1528941530-28724-1-git-send-email-simon.marchi@ericsson.com> (raw)
Cross-compiling for sparc64 bumped into a few issues, fixed by this
patch.
1. Include target.h in sparc-nat.h fixes:
/home/emaisin/src/binutils-gdb/gdb/sparc-nat.h:45:8: error: âtarget_xfer_statusâ does not name a type
extern target_xfer_status sparc_xfer_wcookie (enum target_object object,
2. Remove extra semi-colon at sparc64-linux-nat.c:40 fixes:
/home/emaisin/src/binutils-gdb/gdb/sparc64-linux-nat.c:41:3: error: expected unqualified-id before â{â token
{ sparc_store_inferior_registers (this, regcache, regnum); }
3. Remove "this" argument fixes:
/home/emaisin/src/binutils-gdb/gdb/sparc64-linux-nat.c: In member function âvirtual void sparc64_linux_nat_target::fetch_registers(regcache*, int)â:
/home/emaisin/src/binutils-gdb/gdb/sparc64-linux-nat.c:38:59: error: cannot convert âsparc64_linux_nat_target*â to âregcache*â for argument â1â to âvoid sparc_fetch_inferior_registers(regcache*, int)â
{ sparc_fetch_inferior_registers (this, regcache, regnum); }
^
/home/emaisin/src/binutils-gdb/gdb/sparc64-linux-nat.c: In member function âvirtual void sparc64_linux_nat_target::store_registers(regcache*, int)â:
/home/emaisin/src/binutils-gdb/gdb/sparc64-linux-nat.c:41:59: error: cannot convert âsparc64_linux_nat_target*â to âregcache*â for argument â1â to âvoid sparc_store_inferior_registers(regcache*, int)â
{ sparc_store_inferior_registers (this, regcache, regnum); }
^
4. Use sparc64_forget_process instead of sparc_forget_process fixes:
/home/emaisin/src/binutils-gdb/gdb/sparc64-linux-nat.c: In member function âvirtual void sparc64_linux_nat_target::low_forget_process(pid_t)â:
/home/emaisin/src/binutils-gdb/gdb/sparc64-linux-nat.c:47:30: error: âsparc_forget_processâ was not declared in this scope
{ sparc_forget_process (pid); }
^
gdb/ChangeLog:
* sparc-nat.h: Include target.h.
* sparc64-linux-nat.c (class sparc64_linux_nat_target)
<fetch_registers>: Remove this argument in function call.
<store_registers>: Remove this argument in function call, remove
extra semicolon.
<low_forget_process>: Call sparc64_forget_process instead of
sparc_forget_process.
---
gdb/ChangeLog | 10 ++++++++++
gdb/sparc-nat.h | 2 ++
gdb/sparc64-linux-nat.c | 8 ++++----
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 42995df..0da732a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,13 @@
+2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
+
+ * sparc-nat.h: Include target.h.
+ * sparc64-linux-nat.c (class sparc64_linux_nat_target)
+ <fetch_registers>: Remove this argument in function call.
+ <store_registers>: Remove this argument in function call, remove
+ extra semicolon.
+ <low_forget_process>: Call sparc64_forget_process instead of
+ sparc_forget_process.
+
2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* procfs.c (_initialize_procfs): Use add_inf_child_target.
diff --git a/gdb/sparc-nat.h b/gdb/sparc-nat.h
index b564c01..6a8b4a0 100644
--- a/gdb/sparc-nat.h
+++ b/gdb/sparc-nat.h
@@ -20,6 +20,8 @@
#ifndef SPARC_NAT_H
#define SPARC_NAT_H 1
+#include "target.h"
+
struct sparc_gregmap;
struct sparc_fpregmap;
diff --git a/gdb/sparc64-linux-nat.c b/gdb/sparc64-linux-nat.c
index ba9397e..4a206b4 100644
--- a/gdb/sparc64-linux-nat.c
+++ b/gdb/sparc64-linux-nat.c
@@ -35,16 +35,16 @@ class sparc64_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 (this, regcache, regnum); }
+ { sparc_fetch_inferior_registers (regcache, regnum); }
- void store_registers (struct regcache *regcache, int regnum) override;
- { sparc_store_inferior_registers (this, regcache, regnum); }
+ void store_registers (struct regcache *regcache, int regnum) override
+ { sparc_store_inferior_registers (regcache, regnum); }
/* Override linux_nat_target low methods. */
/* ADI support */
void low_forget_process (pid_t pid) override
- { sparc_forget_process (pid); }
+ { sparc64_forget_process (pid); }
};
static sparc64_linux_nat_target the_sparc64_linux_nat_target;
--
2.7.4
reply other threads:[~2018-06-14 1:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1528941530-28724-1-git-send-email-simon.marchi@ericsson.com \
--to=simon.marchi@ericsson.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).