gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gdb / i386-nbsd-nat.c
index 508abdc92eed57ee8041b24f61605133b6dcbdfd..ac775c1ff846605929553192d88f36e0e16ee0ee 100644 (file)
@@ -1,6 +1,6 @@
 /* Native-dependent code for NetBSD/i386.
 
-   Copyright (C) 2004-2018 Free Software Foundation, Inc.
+   Copyright (C) 2004-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -61,22 +61,23 @@ i386nbsd_supply_pcb (struct regcache *regcache, struct pcb *pcb)
 
   read_memory (pcb->pcb_esp, (gdb_byte *)&sf, sizeof sf);
   pcb->pcb_esp += sizeof (struct switchframe);
-  regcache_raw_supply (regcache, I386_EDI_REGNUM, &sf.sf_edi);
-  regcache_raw_supply (regcache, I386_ESI_REGNUM, &sf.sf_esi);
-  regcache_raw_supply (regcache, I386_EBP_REGNUM, &pcb->pcb_ebp);
-  regcache_raw_supply (regcache, I386_ESP_REGNUM, &pcb->pcb_esp);
-  regcache_raw_supply (regcache, I386_EBX_REGNUM, &sf.sf_ebx);
-  regcache_raw_supply (regcache, I386_EIP_REGNUM, &sf.sf_eip);
+  regcache->raw_supply (I386_EDI_REGNUM, &sf.sf_edi);
+  regcache->raw_supply (I386_ESI_REGNUM, &sf.sf_esi);
+  regcache->raw_supply (I386_EBP_REGNUM, &pcb->pcb_ebp);
+  regcache->raw_supply (I386_ESP_REGNUM, &pcb->pcb_esp);
+  regcache->raw_supply (I386_EBX_REGNUM, &sf.sf_ebx);
+  regcache->raw_supply (I386_EIP_REGNUM, &sf.sf_eip);
 
   return 1;
 }
 
 static i386_bsd_nat_target<nbsd_nat_target> the_i386_nbsd_nat_target;
 
+void _initialize_i386nbsd_nat ();
 void
-_initialize_i386nbsd_nat (void)
+_initialize_i386nbsd_nat ()
 {
-  add_target (&the_i386_nbsd_nat_target);
+  add_inf_child_target (&the_i386_nbsd_nat_target);
 
   /* Support debugging kernel virtual memory images.  */
   bsd_kvm_add_target (i386nbsd_supply_pcb);
This page took 0.03516 seconds and 4 git commands to generate.