X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Famd64-nbsd-nat.c;h=7a4c0057352656331077b246ad4e750638b20700;hb=refs%2Fheads%2Fconcurrent-displaced-stepping-2020-04-01;hp=560ae89c7f3c1ab5ce27a914fc3267bef7b4a345;hpb=61baf725eca99af2569262d10aca03dcde2698f6;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/amd64-nbsd-nat.c b/gdb/amd64-nbsd-nat.c index 560ae89c7f..7a4c005735 100644 --- a/gdb/amd64-nbsd-nat.c +++ b/gdb/amd64-nbsd-nat.c @@ -1,6 +1,6 @@ /* Native-dependent code for NetBSD/amd64. - Copyright (C) 2003-2017 Free Software Foundation, Inc. + Copyright (C) 2003-2020 Free Software Foundation, Inc. This file is part of GDB. @@ -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 @@ -52,22 +53,16 @@ static int amd64nbsd32_r_reg_offset[] = 16 * 8, /* %fs */ 15 * 8 /* %gs */ }; - -/* Provide a prototype to silence -Wmissing-prototypes. */ -void _initialize_amd64nbsd_nat (void); +static amd64_bsd_nat_target the_amd64_nbsd_nat_target; +void _initialize_amd64nbsd_nat (); void -_initialize_amd64nbsd_nat (void) +_initialize_amd64nbsd_nat () { - 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_inf_child_target (&the_amd64_nbsd_nat_target); }