Add an optional "alias" attribute to syscall entries.
[deliverable/binutils-gdb.git] / gdb / ravenscar-thread.c
index f748e87989b7559ae0f194af873869fe0e48bbb8..856f40bd1605de75b3c1be6eabcbb464370dd794 100644 (file)
@@ -81,12 +81,11 @@ static const target_info ravenscar_target_info = {
 
 struct ravenscar_thread_target final : public target_ops
 {
-  ravenscar_thread_target ()
-  { to_stratum = thread_stratum; }
-
   const target_info &info () const override
   { return ravenscar_target_info; }
 
+  strata stratum () const override { return thread_stratum; }
+
   ptid_t wait (ptid_t, struct target_waitstatus *, int) override;
   void resume (ptid_t, int, enum gdb_signal) override;
 
@@ -116,13 +115,6 @@ struct ravenscar_thread_target final : public target_ops
   ptid_t get_ada_task_ptid (long lwp, long thread) override;
 
   void mourn_inferior () override;
-
-  bool has_all_memory ()  override { return default_child_has_all_memory (); }
-  bool has_memory ()  override { return default_child_has_memory (); }
-  bool has_stack ()  override { return default_child_has_stack (); }
-  bool has_registers ()  override { return default_child_has_registers (); }
-  bool has_execution (ptid_t ptid) override
-  { return default_child_has_execution (ptid); }
 };
 
 /* This module's target-specific operations.  */
@@ -147,7 +139,7 @@ is_ravenscar_task (ptid_t ptid)
      2.0.48 for LEON3 sends 'm0' as a reply to the 'qfThreadInfo'
      query, which the remote protocol layer then treats as a thread
      whose TID is 0.  This is obviously not a ravenscar task.  */
-  return ptid_get_lwp (ptid) == 0 && ptid_get_tid (ptid) != 0;
+  return ptid.lwp () == 0 && ptid.tid () != 0;
 }
 
 /* Given PTID, which can be either a ravenscar task or a CPU thread,
@@ -171,7 +163,7 @@ ravenscar_get_thread_base_cpu (ptid_t ptid)
   else
     {
       /* We assume that the LWP of the PTID is equal to the CPU number.  */
-      base_cpu = ptid_get_lwp (ptid);
+      base_cpu = ptid.lwp ();
     }
 
   return base_cpu;
@@ -193,7 +185,7 @@ ravenscar_task_is_currently_active (ptid_t ptid)
   ptid_t active_task_ptid
     = ravenscar_active_task (ravenscar_get_thread_base_cpu (ptid));
 
-  return ptid_equal (ptid, active_task_ptid);
+  return ptid == active_task_ptid;
 }
 
 /* Return the CPU thread (as a ptid_t) on which the given ravenscar
@@ -235,7 +227,7 @@ ravenscar_update_inferior_ptid (void)
   /* Make sure we set base_ptid before calling ravenscar_active_task
      as the latter relies on it.  */
   inferior_ptid = ravenscar_active_task (base_cpu);
-  gdb_assert (!ptid_equal (inferior_ptid, null_ptid));
+  gdb_assert (inferior_ptid != null_ptid);
 
   /* The running thread may not have been added to
      system.tasking.debug's list yet; so ravenscar_update_thread_list
@@ -291,7 +283,7 @@ has_ravenscar_runtime (void)
 static int
 ravenscar_runtime_initialized (void)
 {
-  return (!(ptid_equal (ravenscar_active_task (1), null_ptid)));
+  return (!(ravenscar_active_task (1) == null_ptid));
 }
 
 /* Return the ID of the thread that is currently running.
@@ -405,7 +397,7 @@ ravenscar_thread_target::pid_to_str (ptid_t ptid)
 {
   static char buf[30];
 
-  snprintf (buf, sizeof (buf), "Thread %#x", (int) ptid_get_tid (ptid));
+  snprintf (buf, sizeof (buf), "Thread %#x", (int) ptid.tid ());
   return buf;
 }
 
@@ -442,7 +434,7 @@ ravenscar_thread_target::store_registers (struct regcache *regcache,
       struct ravenscar_arch_ops *arch_ops
        = gdbarch_ravenscar_ops (gdbarch);
 
-      beneath ()->store_registers (regcache, regnum);
+      arch_ops->to_store_registers (regcache, regnum);
     }
   else
     beneath ()->store_registers (regcache, regnum);
@@ -461,7 +453,7 @@ ravenscar_thread_target::prepare_to_store (struct regcache *regcache)
       struct ravenscar_arch_ops *arch_ops
        = gdbarch_ravenscar_ops (gdbarch);
 
-      beneath ()->prepare_to_store (regcache);
+      arch_ops->to_prepare_to_store (regcache);
     }
   else
     beneath ()->prepare_to_store (regcache);
This page took 0.040456 seconds and 4 git commands to generate.