[pushed] Fix s390 GNU/Linux build

Message ID 20180503113102.19032-1-palves@redhat.com
State New
Headers show
Series
  • [pushed] Fix s390 GNU/Linux build
Related show

Commit Message

Pedro Alves May 3, 2018, 11:31 a.m.
- Fixes this compile error:

  ../../src/gdb/s390-linux-nat.c:125:8: error: ‘virtual bool s390_linux_nat_target::have_continuable_watchpoint()’ can be marked override [-Werror=suggest-override]
     bool have_continuable_watchpoint () { return 1; }
	  ^~~~~~~~~~~~~~~~~~~~~~~~~~~

  s390 never implemented that hook.  The declaration of the method got
  there simply via copy/paste from some other target.

  Return 'true' instead of '1' while at it.

- Fixes this link error:

  s390-linux-nat.o:(.rodata._ZTV21s390_linux_nat_target[_ZTV21s390_linux_nat_target]+0x120): undefined reference to `s390_linux_nat_target::watchpoint_addr_within_range(unsigned long, unsigned long, int)'

gdb/ChangeLog:
2018-05-03  Pedro Alves  <palves@redhat.com>

	* s390-linux-nat.c
	(s390_linux_nat_target::have_continuable_watchpoint): Mark with
	override.  Write 'true' instead of '1'.
	(s390_linux_nat_target::watchpoint_addr_within_range): Remove
	declaration.
---
 gdb/ChangeLog        | 8 ++++++++
 gdb/s390-linux-nat.c | 3 +--
 2 files changed, 9 insertions(+), 2 deletions(-)

-- 
2.14.3

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 221268bb8d..1825c2c64d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,11 @@ 
+2018-05-03  Pedro Alves  <palves@redhat.com>
+
+	* s390-linux-nat.c
+	(s390_linux_nat_target::have_continuable_watchpoint): Mark with
+	override.  Write 'true' instead of '1'.
+	(s390_linux_nat_target::watchpoint_addr_within_range): Remove
+	declaration.
+
 2018-05-02  Pedro Alves  <palves@redhat.com>
 
 	* aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c
index c54c8d212d..3c65c5eaa5 100644
--- a/gdb/s390-linux-nat.c
+++ b/gdb/s390-linux-nat.c
@@ -122,9 +122,8 @@  public:
   int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *)
     override;
   int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
-  bool have_continuable_watchpoint () { return 1; }
+  bool have_continuable_watchpoint () override { return true; }
   bool stopped_by_watchpoint () override;
-  bool watchpoint_addr_within_range (CORE_ADDR, CORE_ADDR, int) override;
   int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
 			 struct expression *) override;
   int remove_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,