gdbserver/linux-low: turn 'cannot_{fetch/store}_register' into methods
[deliverable/binutils-gdb.git] / gdbserver / linux-riscv-low.cc
index 092f497b85ab95066650071f59118892833d4f80..4f2e28beafced2135379b4bf068f9fbae61dd727 100644 (file)
@@ -41,12 +41,30 @@ public:
 protected:
 
   void low_arch_setup () override;
+
+  bool low_cannot_fetch_register (int regno) override;
+
+  bool low_cannot_store_register (int regno) override;
 };
 
 /* The singleton target ops object.  */
 
 static riscv_target the_riscv_target;
 
+bool
+riscv_target::low_cannot_fetch_register (int regno)
+{
+  gdb_assert_not_reached ("linux target op low_cannot_fetch_register "
+                         "is not implemented by the target");
+}
+
+bool
+riscv_target::low_cannot_store_register (int regno)
+{
+  gdb_assert_not_reached ("linux target op low_cannot_store_register "
+                         "is not implemented by the target");
+}
+
 /* Implementation of linux target ops method "low_arch_setup".  */
 
 void
@@ -273,8 +291,6 @@ riscv_breakpoint_at (CORE_ADDR pc)
 /* RISC-V/Linux target operations.  */
 struct linux_target_ops the_low_target =
 {
-  NULL, /* cannot_fetch_register */
-  NULL, /* cannot_store_register */
   riscv_fetch_register,
   riscv_get_pc,
   riscv_set_pc,
This page took 0.024484 seconds and 4 git commands to generate.