Fix tagged pointer support
[deliverable/binutils-gdb.git] / gdb / mips-linux-nat.c
index 39bd03a5e9efe62a11349a23e631416d16dd275d..4e0c51bd2dd998b5f094d56fd15e67a0a716fccb 100644 (file)
@@ -59,9 +59,9 @@ public:
   int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
                         struct expression *) override;
 
-  int stopped_by_watchpoint () override;
+  bool stopped_by_watchpoint () override;
 
-  int stopped_data_address (CORE_ADDR *) override;
+  bool stopped_data_address (CORE_ADDR *) override;
 
   int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
 
@@ -72,6 +72,9 @@ protected:
   CORE_ADDR register_u_offset (struct gdbarch *gdbarch,
                               int regno, int store_p) override;
 
+  /* Override linux_nat_target low methods.  */
+  void low_new_thread (struct lwp_info *lp) override;
+
 private:
   /* Helpers.  See definitions.  */
   void mips64_regsets_store_registers (struct regcache *regcache,
@@ -572,7 +575,7 @@ mips_linux_nat_target::can_use_hw_breakpoint (enum bptype type,
    stopped by watchpoint.  The watchhi R and W bits indicate the watch
    register triggered.  */
 
-int
+bool
 mips_linux_nat_target::stopped_by_watchpoint ()
 {
   int n;
@@ -581,27 +584,27 @@ mips_linux_nat_target::stopped_by_watchpoint ()
   if (!mips_linux_read_watch_registers (ptid_get_lwp (inferior_ptid),
                                        &watch_readback,
                                        &watch_readback_valid, 1))
-    return 0;
+    return false;
 
   num_valid = mips_linux_watch_get_num_valid (&watch_readback);
 
   for (n = 0; n < MAX_DEBUG_REGISTER && n < num_valid; n++)
     if (mips_linux_watch_get_watchhi (&watch_readback, n) & (R_MASK | W_MASK))
-      return 1;
+      return true;
 
-  return 0;
+  return false;
 }
 
 /* Target to_stopped_data_address implementation.  Set the address
    where the watch triggered (if known).  Return 1 if the address was
    known.  */
 
-int
+bool
 mips_linux_nat_target::stopped_data_address (CORE_ADDR *paddr)
 {
   /* On mips we don't know the low order 3 bits of the data address,
      so we must return false.  */
-  return 0;
+  return false;
 }
 
 /* Target to_region_ok_for_hw_watchpoint implementation.  Return 1 if
@@ -642,11 +645,11 @@ write_watchpoint_regs (void)
   return 0;
 }
 
-/* linux_nat new_thread implementation.  Write the mirrored watch
- register values for the new thread.  */
+/* linux_nat_target::low_new_thread implementation.  Write the
  mirrored watch register values for the new thread.  */
 
-static void
-mips_linux_new_thread (struct lwp_info *lp)
+void
+mips_linux_nat_target::low_new_thread (struct lwp_info *lp)
 {
   long tid = lp->ptid.lwp ();
 
@@ -799,7 +802,5 @@ triggers a breakpoint or watchpoint."),
                           &maintenance_show_cmdlist);
 
   linux_target = &the_mips_linux_nat_target;
-  add_target (&the_mips_linux_nat_target);
-  linux_nat_set_new_thread (&the_mips_linux_nat_target,
-                           mips_linux_new_thread);
+  add_inf_child_target (&the_mips_linux_nat_target);
 }
This page took 0.024982 seconds and 4 git commands to generate.