Add missing client_state struct references to win target.
[deliverable/binutils-gdb.git] / gdb / score-tdep.c
index 715a092eb4e33eca3d7b6160aa208b5e4a4d6cb7..16bf00ea024e35d8fa9eb70bbb185fe3aa8f619b 100644 (file)
@@ -1,7 +1,7 @@
 /* Target-dependent code for the S+core architecture, for GDB,
    the GNU Debugger.
 
-   Copyright (C) 2006-2016 Free Software Foundation, Inc.
+   Copyright (C) 2006-2018 Free Software Foundation, Inc.
 
    Contributed by Qinwei (qinwei@sunnorth.com.cn)
    Contributed by Ching-Peng Lin (cplin@sunplus.com)
@@ -126,15 +126,6 @@ score_register_sim_regno (struct gdbarch *gdbarch, int regnum)
 }
 #endif
 
-static int
-score_print_insn (bfd_vma memaddr, struct disassemble_info *info)
-{
-  if (info->endian == BFD_ENDIAN_BIG)
-    return print_insn_big_score (memaddr, info);
-  else
-    return print_insn_little_score (memaddr, info);
-}
-
 static inst_t *
 score7_fetch_inst (struct gdbarch *gdbarch, CORE_ADDR addr, gdb_byte *memblock)
 {
@@ -368,8 +359,6 @@ score7_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
     }
 }
 
-GDBARCH_BREAKPOINT_FROM_PC (score7)
-
 /* Implement the breakpoint_kind_from_pc gdbarch method.  */
 
 static int
@@ -406,8 +395,6 @@ score3_sw_breakpoint_from_kind (struct gdbarch *gdbarch, int kind, int *size)
   return score_break_insns[index];
 }
 
-GDBARCH_BREAKPOINT_FROM_PC (score3)
-
 static CORE_ADDR
 score_adjust_breakpoint_address (struct gdbarch *gdbarch, CORE_ADDR bpaddr)
 {
@@ -455,11 +442,11 @@ score_xfer_register (struct regcache *regcache, int regnum, int length,
     }
 
   if (readbuf != NULL)
-    regcache_cooked_read_part (regcache, regnum, reg_offset, length,
-                               readbuf + buf_offset);
+    regcache->cooked_read_part (regnum, reg_offset, length,
+                               readbuf + buf_offset);
   if (writebuf != NULL)
-    regcache_cooked_write_part (regcache, regnum, reg_offset, length,
-                                writebuf + buf_offset);
+    regcache->cooked_write_part (regnum, reg_offset, length,
+                                writebuf + buf_offset);
 }
 
 static enum return_value_convention
@@ -1441,9 +1428,8 @@ score7_linux_supply_gregset(const struct regset *regset,
      collect function will store the PC in that slot.  */
   if ((regnum == -1 || regnum == SCORE_EPC_REGNUM)
       && size >= SCORE7_LINUX_EPC_OFFSET + 4)
-    regcache_raw_supply (regcache, SCORE_EPC_REGNUM,
-                        (const gdb_byte *) buf
-                        + SCORE7_LINUX_EPC_OFFSET);
+    regcache->raw_supply
+      (SCORE_EPC_REGNUM, (const gdb_byte *) buf + SCORE7_LINUX_EPC_OFFSET);
 }
 
 static const struct regset score7_linux_gregset =
@@ -1495,12 +1481,14 @@ score_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_inner_than (gdbarch, core_addr_lessthan);
   set_gdbarch_unwind_sp (gdbarch, score_unwind_sp);
   set_gdbarch_unwind_pc (gdbarch, score_unwind_pc);
-  set_gdbarch_print_insn (gdbarch, score_print_insn);
 
   switch (target_mach)
     {
     case bfd_mach_score7:
-      SET_GDBARCH_BREAKPOINT_MANIPULATION (score7);
+      set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+                                          score7_breakpoint_kind_from_pc);
+      set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+                                          score7_sw_breakpoint_from_kind);
       set_gdbarch_skip_prologue (gdbarch, score7_skip_prologue);
       set_gdbarch_stack_frame_destroyed_p (gdbarch,
                                           score7_stack_frame_destroyed_p);
@@ -1512,7 +1500,10 @@ score_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
       break;
 
     case bfd_mach_score3:
-      SET_GDBARCH_BREAKPOINT_MANIPULATION (score3);
+      set_gdbarch_breakpoint_kind_from_pc (gdbarch,
+                                          score3_breakpoint_kind_from_pc);
+      set_gdbarch_sw_breakpoint_from_kind (gdbarch,
+                                          score3_sw_breakpoint_from_kind);
       set_gdbarch_skip_prologue (gdbarch, score3_skip_prologue);
       set_gdbarch_stack_frame_destroyed_p (gdbarch,
                                           score3_stack_frame_destroyed_p);
@@ -1539,8 +1530,6 @@ score_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   return gdbarch;
 }
 
-extern initialize_file_ftype _initialize_score_tdep;
-
 void
 _initialize_score_tdep (void)
 {
This page took 0.030504 seconds and 4 git commands to generate.