Add a fall-through comment to stabsread.c
[deliverable/binutils-gdb.git] / gdb / moxie-tdep.c
index 4cd3bcd18f35c7dd60d182a4ec7075119faf98f3..50cacfef972e0d70fe65f601af384f0c013350b8 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for Moxie.
 
-   Copyright (C) 2009-2017 Free Software Foundation, Inc.
+   Copyright (C) 2009-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "moxie-tdep.h"
 #include <algorithm>
 
-/* Local functions.  */
-
-extern void _initialize_moxie_tdep (void);
-
 /* Use an invalid address value as 'not available' marker.  */
 enum { REG_UNAVAIL = (CORE_ADDR) -1 };
 
@@ -112,7 +108,7 @@ static void
 moxie_store_return_value (struct type *type, struct regcache *regcache,
                         const gdb_byte *valbuf)
 {
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch *gdbarch = regcache->arch ();
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   CORE_ADDR regval;
   int len = TYPE_LENGTH (type);
@@ -302,7 +298,7 @@ moxie_process_readu (CORE_ADDR addr, gdb_byte *buf,
 static std::vector<CORE_ADDR>
 moxie_software_single_step (struct regcache *regcache)
 {
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch *gdbarch = regcache->arch ();
   CORE_ADDR addr;
   gdb_byte buf[4];
   uint16_t inst;
@@ -452,25 +448,6 @@ moxie_software_single_step (struct regcache *regcache)
   return next_pcs;
 }
 
-/* Implement the "read_pc" gdbarch method.  */
-
-static CORE_ADDR
-moxie_read_pc (struct regcache *regcache)
-{
-  ULONGEST pc;
-
-  regcache_cooked_read_unsigned (regcache, MOXIE_PC_REGNUM, &pc);
-  return pc;
-}
-
-/* Implement the "write_pc" gdbarch method.  */
-
-static void
-moxie_write_pc (struct regcache *regcache, CORE_ADDR val)
-{
-  regcache_cooked_write_unsigned (regcache, MOXIE_PC_REGNUM, val);
-}
-
 /* Implement the "unwind_sp" gdbarch method.  */
 
 static CORE_ADDR
@@ -486,7 +463,7 @@ static void
 moxie_extract_return_value (struct type *type, struct regcache *regcache,
                            gdb_byte *dst)
 {
-  struct gdbarch *gdbarch = get_regcache_arch (regcache);
+  struct gdbarch *gdbarch = regcache->arch ();
   enum bfd_endian byte_order = gdbarch_byte_order (gdbarch);
   int len = TYPE_LENGTH (type);
   ULONGEST tmp;
@@ -1113,8 +1090,6 @@ moxie_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   set_gdbarch_wchar_bit (gdbarch, 32);
   set_gdbarch_wchar_signed (gdbarch, 0);
 
-  set_gdbarch_read_pc (gdbarch, moxie_read_pc);
-  set_gdbarch_write_pc (gdbarch, moxie_write_pc);
   set_gdbarch_unwind_sp (gdbarch, moxie_unwind_sp);
 
   set_gdbarch_num_regs (gdbarch, MOXIE_NUM_REGS);
This page took 0.036087 seconds and 4 git commands to generate.