]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gdb/amd64-nbsd-nat.c
Convert struct target_ops to C++
[thirdparty/binutils-gdb.git] / gdb / amd64-nbsd-nat.c
index cd8478342b983f1ee2318344611b96cc06b51497..e1c07dfb4c996a886d9e43a5aa142a50dd9f32df 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "nbsd-nat.h"
 #include "amd64-tdep.h"
+#include "amd64-bsd-nat.h"
 #include "amd64-nat.h"
 
 /* Mapping between the general-purpose registers in NetBSD/amd64
@@ -53,17 +54,14 @@ static int amd64nbsd32_r_reg_offset[] =
   15 * 8                       /* %gs */
 };
 
+static amd64_bsd_nat_target<nbsd_nat_target> the_amd64_nbsd_nat_target;
+
 void
 _initialize_amd64nbsd_nat (void)
 {
-  struct target_ops *t;
-
   amd64_native_gregset32_reg_offset = amd64nbsd32_r_reg_offset;
   amd64_native_gregset32_num_regs = ARRAY_SIZE (amd64nbsd32_r_reg_offset);
   amd64_native_gregset64_reg_offset = amd64nbsd_r_reg_offset;
 
-  /* Add some extra features to the common *BSD/amd64 target.  */
-  t = amd64bsd_target ();
-  t->to_pid_to_exec_file = nbsd_pid_to_exec_file;
-  add_target (t);
+  add_target (&the_amd64_nbsd_nat_target);
 }