Fix tagged pointer support
[deliverable/binutils-gdb.git] / gdb / bsd-uthread.c
index 19d49c76f9a7648c29169ec19ecd5f2776042104..1505cfede70541ab9b777b4401a05fdb45c46013 100644 (file)
 
 #include "bsd-uthread.h"
 
+static const target_info bsd_uthread_target_info = {
+  "bsd-uthreads",
+  N_("BSD user-level threads"),
+  N_("BSD user-level threads")
+};
+
 struct bsd_uthread_target final : public target_ops
 {
   bsd_uthread_target ()
   { to_stratum = thread_stratum; }
 
-  const char *shortname () override
-  { return "bsd-uthreads"; }
-
-  const char *longname () override
-  { return _("BSD user-level threads"); }
-
-  const char *doc () override
-  { return _("BSD user-level threads"); }
+  const target_info &info () const override
+  { return bsd_uthread_target_info; }
 
   void close () override;
 
@@ -57,7 +57,7 @@ struct bsd_uthread_target final : public target_ops
   ptid_t wait (ptid_t, struct target_waitstatus *, int) override;
   void resume (ptid_t, int, enum gdb_signal) override;
 
-  int thread_alive (ptid_t ptid) override;
+  bool thread_alive (ptid_t ptid) override;
 
   void update_thread_list () override;
 
@@ -437,7 +437,7 @@ bsd_uthread_target::resume (ptid_t ptid, int step, enum gdb_signal sig)
   beneath->resume (ptid, step, sig);
 }
 
-int
+bool
 bsd_uthread_target::thread_alive (ptid_t ptid)
 {
   enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
@@ -453,7 +453,7 @@ bsd_uthread_target::thread_alive (ptid_t ptid)
 
       state = read_memory_unsigned_integer (addr + offset, 4, byte_order);
       if (state == BSD_UTHREAD_PS_DEAD)
-       return 0;
+       return false;
     }
 
   return beneath->thread_alive (ptid);
This page took 0.03535 seconds and 4 git commands to generate.