aboutsummaryrefslogtreecommitdiff
path: root/gdb/obsd-nat.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/obsd-nat.c')
-rw-r--r--gdb/obsd-nat.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/gdb/obsd-nat.c b/gdb/obsd-nat.c
index c3cd295..91bed71 100644
--- a/gdb/obsd-nat.c
+++ b/gdb/obsd-nat.c
@@ -35,8 +35,8 @@
#ifdef PT_GET_THREAD_FIRST
-static const char *
-obsd_pid_to_str (struct target_ops *ops, ptid_t ptid)
+const char *
+obsd_nat_target::pid_to_str (ptid_t ptid)
{
if (ptid_get_lwp (ptid) != 0)
{
@@ -49,8 +49,8 @@ obsd_pid_to_str (struct target_ops *ops, ptid_t ptid)
return normal_pid_to_str (ptid);
}
-static void
-obsd_update_thread_list (struct target_ops *ops)
+void
+obsd_nat_target::update_thread_list ()
{
pid_t pid = ptid_get_pid (inferior_ptid);
struct ptrace_thread_state pts;
@@ -77,9 +77,9 @@ obsd_update_thread_list (struct target_ops *ops)
}
}
-static ptid_t
-obsd_wait (struct target_ops *ops,
- ptid_t ptid, struct target_waitstatus *ourstatus, int options)
+ptid_t
+obsd_nat_target::wait (ptid_t ptid, struct target_waitstatus *ourstatus,
+ int options)
{
pid_t pid;
int status, save_errno;
@@ -165,22 +165,4 @@ obsd_wait (struct target_ops *ops,
return ptid;
}
-void
-obsd_add_target (struct target_ops *t)
-{
- /* Override some methods to support threads. */
- t->to_pid_to_str = obsd_pid_to_str;
- t->to_update_thread_list = obsd_update_thread_list;
- t->to_wait = obsd_wait;
- add_target (t);
-}
-
-#else
-
-void
-obsd_add_target (struct target_ops *t)
-{
- add_target (t);
-}
-
#endif /* PT_GET_THREAD_FIRST */