x86: use D attribute also for SIMD templates
[deliverable/binutils-gdb.git] / gdb / sparc-ravenscar-thread.c
index 89f960aa24d9fc9683d071c38ebf9dbec643a077..b076232e0426b246e0c968fb8a259c0492a45b77 100644 (file)
@@ -1,6 +1,6 @@
 /* Ravenscar SPARC target support.
 
-   Copyright (C) 2004-2017 Free Software Foundation, Inc.
+   Copyright (C) 2004-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -62,13 +62,13 @@ static void
 supply_register_at_address (struct regcache *regcache, int regnum,
                             CORE_ADDR register_addr)
 {
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch *gdbarch = regcache->arch ();
   int buf_size = register_size (gdbarch, regnum);
   gdb_byte *buf;
 
   buf = (gdb_byte *) alloca (buf_size);
   read_memory (register_addr, buf, buf_size);
-  regcache_raw_supply (regcache, regnum, buf);
+  regcache->raw_supply (regnum, buf);
 }
 
 /* Return true if, for a non-running thread, REGNUM has been saved on the
@@ -103,7 +103,7 @@ register_in_thread_descriptor_p (int regnum)
 static void
 sparc_ravenscar_fetch_registers (struct regcache *regcache, int regnum)
 {
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch *gdbarch = regcache->arch ();
   const int sp_regnum = gdbarch_sp_regnum (gdbarch);
   const int num_regs = gdbarch_num_regs (gdbarch);
   int current_regnum;
@@ -112,7 +112,7 @@ sparc_ravenscar_fetch_registers (struct regcache *regcache, int regnum)
   ULONGEST stack_address;
 
   /* The tid is the thread_id field, which is a pointer to the thread.  */
-  thread_descriptor_address = (CORE_ADDR) ptid_get_tid (inferior_ptid);
+  thread_descriptor_address = (CORE_ADDR) inferior_ptid.tid ();
 
   /* Read the saved SP in the context buffer.  */
   current_address = thread_descriptor_address
@@ -155,14 +155,14 @@ sparc_ravenscar_prepare_to_store (struct regcache *regcache)
 static void
 sparc_ravenscar_store_registers (struct regcache *regcache, int regnum)
 {
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch *gdbarch = regcache->arch ();
   int buf_size = register_size (gdbarch, regnum);
   gdb_byte buf[buf_size];
   ULONGEST register_address;
 
   if (register_in_thread_descriptor_p (regnum))
     register_address =
-      ptid_get_tid (inferior_ptid) + sparc_register_offsets [regnum];
+      inferior_ptid.tid () + sparc_register_offsets [regnum];
   else if (register_on_stack_p (regnum))
     {
       regcache_cooked_read_unsigned (regcache, SPARC_SP_REGNUM,
@@ -172,7 +172,7 @@ sparc_ravenscar_store_registers (struct regcache *regcache, int regnum)
   else
     return;
 
-  regcache_raw_collect (regcache, regnum, buf);
+  regcache->raw_collect (regnum, buf);
   write_memory (register_address,
                 buf,
                 buf_size);
This page took 0.026481 seconds and 4 git commands to generate.