gnulib: define the path to gnulib's parent dir
[binutils-gdb.git] / gdbserver / linux-ia64-low.cc
index 471530a621bffff4c215811148c4d4eccae53bff..30a8670217f5a9dcf88aa9fe4648f26017e50caf 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU/Linux/IA64 specific low level interface, for the remote server for GDB.
-   Copyright (C) 1995-2020 Free Software Foundation, Inc.
+   Copyright (C) 1995-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -31,6 +31,8 @@ public:
 
   const regs_info *get_regs_info () override;
 
+  const gdb_byte *sw_breakpoint_from_kind (int kind, int *size) override;
+
 protected:
 
   void low_arch_setup () override;
@@ -38,12 +40,30 @@ protected:
   bool low_cannot_fetch_register (int regno) override;
 
   bool low_cannot_store_register (int regno) override;
+
+  bool low_fetch_register (regcache *regcache, int regno) override;
+
+  bool low_breakpoint_at (CORE_ADDR pc) override;
 };
 
 /* The singleton target ops object.  */
 
 static ia64_target the_ia64_target;
 
+const gdb_byte *
+ia64_target::sw_breakpoint_from_kind (int kind, int *size)
+{
+  gdb_assert_not_reached ("target op sw_breakpoint_from_kind is not "
+                         "implemented by this target");
+}
+
+bool
+ia64_target::low_breakpoint_at (CORE_ADDR pc)
+{
+  gdb_assert_not_reached ("linux target op low_breakpoint_at is not "
+                         "implemented by this target");
+}
+
 /* Defined in auto-generated file reg-ia64.c.  */
 void init_registers_ia64 (void);
 extern const struct target_desc *tdesc_ia64;
@@ -304,8 +324,8 @@ ia64_target::low_cannot_fetch_register (int regno)
 #define IA64_FR0_REGNUM                128
 #define IA64_FR1_REGNUM                129
 
-static int
-ia64_fetch_register (struct regcache *regcache, int regnum)
+bool
+ia64_target::low_fetch_register (regcache *regcache, int regnum)
 {
   /* r0 cannot be fetched but is always zero.  */
   if (regnum == IA64_GR0_REGNUM)
@@ -314,7 +334,7 @@ ia64_fetch_register (struct regcache *regcache, int regnum)
 
       gdb_assert (sizeof (zero) == register_size (regcache->tdesc, regnum));
       supply_register (regcache, regnum, zero);
-      return 1;
+      return true;
     }
 
   /* fr0 cannot be fetched but is always zero.  */
@@ -324,7 +344,7 @@ ia64_fetch_register (struct regcache *regcache, int regnum)
 
       gdb_assert (sizeof (f_zero) == register_size (regcache->tdesc, regnum));
       supply_register (regcache, regnum, f_zero);
-      return 1;
+      return true;
     }
 
   /* fr1 cannot be fetched but is always one (1.0).  */
@@ -335,10 +355,10 @@ ia64_fetch_register (struct regcache *regcache, int regnum)
 
       gdb_assert (sizeof (f_one) == register_size (regcache->tdesc, regnum));
       supply_register (regcache, regnum, f_one);
-      return 1;
+      return true;
     }
 
-  return 0;
+  return false;
 }
 
 static struct usrregs_info ia64_usrregs_info =
@@ -365,11 +385,6 @@ ia64_target::low_arch_setup ()
   current_process ()->tdesc = tdesc_ia64;
 }
 
-
-struct linux_target_ops the_low_target = {
-  ia64_fetch_register,
-};
-
 /* The linux target ops object.  */
 
 linux_process_target *the_linux_target = &the_ia64_target;