Index: gdb/ChangeLog
authorAndrew Cagney <cagney@redhat.com>
Wed, 7 May 2003 19:21:13 +0000 (19:21 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 7 May 2003 19:21:13 +0000 (19:21 +0000)
2003-05-07  Andrew Cagney  <cagney@redhat.com>

* d10v-tdep.c (remote_d10v_translate_xfer_address): Add
"regcache".
(d10v_print_registers_info): Update.
(d10v_dmap_register, d10v_imap_register): Delete functions.
(struct gdbarch_tdep): Add "regcache" parameter to "dmap_register"
and "imap_register".
(d10v_ts2_dmap_register, d10v_ts2_imap_register): Add "regcache".
(d10v_ts3_dmap_register, d10v_ts3_imap_register): Add "regcache".
* arch-utils.c (generic_remote_translate_xfer_address): Add
"regcache" and "gdbarch" parameters.
* gdbarch.sh (REMOTE_TRANSLATE_XFER_ADDRESS): Add "regcache"
parameter.  Change class to multi-arch.
* gdbarch.h, gdbarch.c: Re-generate.
* remote.c (remote_xfer_memory): Use
gdbarch_remote_translate_xfer_address.

Index: include/gdb/ChangeLog
2003-05-07  Andrew Cagney  <cagney@redhat.com>

* sim-d10v.h (sim_d10v_translate_addr): Add regcache parameter.
(sim_d10v_translate_imap_addr): Add regcache parameter.
(sim_d10v_translate_dmap_addr): Ditto.

Index: sim/d10v/ChangeLog
2003-05-07  Andrew Cagney  <cagney@redhat.com>

* interp.c (sim_d10v_translate_addr): Add "regcache" parameter.
(sim_d10v_translate_imap_addr): Ditto.
(sim_d10v_translate_dmap_addr): Ditto.
(xfer_mem): Pass NULL regcache to sim_d10v_translate_addr.
(dmem_addr): Pass NULL regcache to sim_d10v_translate_dmap_addr.
(dmap_register, imap_register): Add "regcache" parameter.
(imem_addr): Pass NULL regcache to sim_d10v_translate_imap_addr.
(sim_fetch_register): Pass NULL regcache to imap_register and
dmap_register.

gdb/ChangeLog
gdb/arch-utils.c
gdb/d10v-tdep.c
gdb/gdbarch.c
gdb/gdbarch.h
gdb/gdbarch.sh
gdb/remote.c
include/gdb/ChangeLog
include/gdb/sim-d10v.h
sim/d10v/ChangeLog
sim/d10v/interp.c

index 0088c24d20f1c7698b24181a226d1b4f6241f856..12eae514a116afe82e7847783d68a71d94540921 100644 (file)
@@ -1,3 +1,21 @@
+2003-05-07  Andrew Cagney  <cagney@redhat.com>
+
+       * d10v-tdep.c (remote_d10v_translate_xfer_address): Add
+       "regcache".
+       (d10v_print_registers_info): Update.
+       (d10v_dmap_register, d10v_imap_register): Delete functions.
+       (struct gdbarch_tdep): Add "regcache" parameter to "dmap_register"
+       and "imap_register".
+       (d10v_ts2_dmap_register, d10v_ts2_imap_register): Add "regcache".
+       (d10v_ts3_dmap_register, d10v_ts3_imap_register): Add "regcache".
+       * arch-utils.c (generic_remote_translate_xfer_address): Add
+       "regcache" and "gdbarch" parameters.
+       * gdbarch.sh (REMOTE_TRANSLATE_XFER_ADDRESS): Add "regcache"
+       parameter.  Change class to multi-arch.
+       * gdbarch.h, gdbarch.c: Re-generate.
+       * remote.c (remote_xfer_memory): Use
+       gdbarch_remote_translate_xfer_address.
+       
 2003-05-07  Jeff Johnston  <jjohnstn@redhat.com>
 
        * infrun.c (prev_pc): Move declaration ahead of proceed().
index fad8ed1b366aa395dca43e88b260c19887ccb45e..2f555ff6fa8013bbf0f2905791ee22e2684507d4 100644 (file)
@@ -191,7 +191,9 @@ LONGEST legacy_call_dummy_words[1];
 int legacy_sizeof_call_dummy_words = sizeof (legacy_call_dummy_words);
 
 void
-generic_remote_translate_xfer_address (CORE_ADDR gdb_addr, int gdb_len,
+generic_remote_translate_xfer_address (struct gdbarch *gdbarch,
+                                      struct regcache *regcache,
+                                      CORE_ADDR gdb_addr, int gdb_len,
                                       CORE_ADDR * rem_addr, int *rem_len)
 {
   *rem_addr = gdb_addr;
index 348e9f4569d65587113ea79263e67fbe251f60ce..32e60f14c6ec8d9117ba39b5e3d25b9600592886 100644 (file)
@@ -51,8 +51,8 @@ struct gdbarch_tdep
   {
     int a0_regnum;
     int nr_dmap_regs;
-    unsigned long (*dmap_register) (int nr);
-    unsigned long (*imap_register) (int nr);
+    unsigned long (*dmap_register) (void *regcache, int nr);
+    unsigned long (*imap_register) (void *regcache, int nr);
   };
 
 /* These are the addresses the D10V-EVA board maps data and
@@ -236,7 +236,7 @@ d10v_ts3_register_name (int reg_nr)
    one of the segments.  */
 
 static unsigned long
-d10v_ts2_dmap_register (int reg_nr)
+d10v_ts2_dmap_register (void *regcache, int reg_nr)
 {
   switch (reg_nr)
     {
@@ -244,40 +244,38 @@ d10v_ts2_dmap_register (int reg_nr)
     case 1:
       return 0x2000;
     case 2:
-      return read_register (TS2_DMAP_REGNUM);
+      {
+       ULONGEST reg;
+       regcache_cooked_read_unsigned (regcache, TS2_DMAP_REGNUM, &reg);
+       return reg;
+      }
     default:
       return 0;
     }
 }
 
 static unsigned long
-d10v_ts3_dmap_register (int reg_nr)
-{
-  return read_register (TS3_DMAP0_REGNUM + reg_nr);
-}
-
-static unsigned long
-d10v_dmap_register (int reg_nr)
-{
-  return gdbarch_tdep (current_gdbarch)->dmap_register (reg_nr);
-}
-
-static unsigned long
-d10v_ts2_imap_register (int reg_nr)
+d10v_ts3_dmap_register (void *regcache, int reg_nr)
 {
-  return read_register (TS2_IMAP0_REGNUM + reg_nr);
+  ULONGEST reg;
+  regcache_cooked_read_unsigned (regcache, TS3_DMAP0_REGNUM + reg_nr, &reg);
+  return reg;
 }
 
 static unsigned long
-d10v_ts3_imap_register (int reg_nr)
+d10v_ts2_imap_register (void *regcache, int reg_nr)
 {
-  return read_register (TS3_IMAP0_REGNUM + reg_nr);
+  ULONGEST reg;
+  regcache_cooked_read_unsigned (regcache, TS2_IMAP0_REGNUM + reg_nr, &reg);
+  return reg;
 }
 
 static unsigned long
-d10v_imap_register (int reg_nr)
+d10v_ts3_imap_register (void *regcache, int reg_nr)
 {
-  return gdbarch_tdep (current_gdbarch)->imap_register (reg_nr);
+  ULONGEST reg;
+  regcache_cooked_read_unsigned (regcache, TS3_IMAP0_REGNUM + reg_nr, &reg);
+  return reg;
 }
 
 /* MAP GDB's internal register numbering (determined by the layout fo
@@ -804,6 +802,7 @@ static void
 d10v_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
                           struct frame_info *frame, int regnum, int all)
 {
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   if (regnum >= 0)
     {
       default_print_registers_info (gdbarch, file, frame, regnum, all);
@@ -847,16 +846,19 @@ d10v_print_registers_info (struct gdbarch *gdbarch, struct ui_file *file,
       {
        if (a > 0)
          fprintf_filtered (file, "    ");
-       fprintf_filtered (file, "IMAP%d %04lx", a, d10v_imap_register (a));
+       fprintf_filtered (file, "IMAP%d %04lx", a,
+                         tdep->imap_register (current_regcache, a));
       }
     if (nr_dmap_regs (gdbarch) == 1)
       /* Registers DMAP0 and DMAP1 are constant.  Just return dmap2.  */
-      fprintf_filtered (file, "    DMAP %04lx\n", d10v_dmap_register (2));
+      fprintf_filtered (file, "    DMAP %04lx\n",
+                       tdep->dmap_register (current_regcache, 2));
     else
       {
        for (a = 0; a < nr_dmap_regs (gdbarch); a++)
          {
-           fprintf_filtered (file, "    DMAP%d %04lx", a, d10v_dmap_register (a));
+           fprintf_filtered (file, "    DMAP%d %04lx", a,
+                             tdep->dmap_register (current_regcache, a));
          }
        fprintf_filtered (file, "\n");
       }
@@ -1100,15 +1102,16 @@ d10v_extract_return_value (struct type *type, struct regcache *regcache,
    VM system works, we just call that to do the translation. */
 
 static void
-remote_d10v_translate_xfer_address (CORE_ADDR memaddr, int nr_bytes,
+remote_d10v_translate_xfer_address (struct gdbarch *gdbarch,
+                                   struct regcache *regcache,
+                                   CORE_ADDR memaddr, int nr_bytes,
                                    CORE_ADDR *targ_addr, int *targ_len)
 {
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   long out_addr;
   long out_len;
-  out_len = sim_d10v_translate_addr (memaddr, nr_bytes,
-                                    &out_addr,
-                                    d10v_dmap_register,
-                                    d10v_imap_register);
+  out_len = sim_d10v_translate_addr (memaddr, nr_bytes, &out_addr, regcache,
+                                    tdep->dmap_register, tdep->imap_register);
   *targ_addr = out_addr;
   *targ_len = out_len;
 }
index 667dbe0f577dfdbdaa9faa2696e0e1be34834d95..db9e76e96717df7e38b8f5c1edab009190c7b6b5 100644 (file)
@@ -402,7 +402,7 @@ struct gdbarch startup_gdbarch =
   0,
   0,
   0,
-  0,
+  generic_remote_translate_xfer_address,
   0,
   0,
   0,
@@ -2183,21 +2183,11 @@ gdbarch_dump (struct gdbarch *gdbarch, struct ui_file *file)
                         "gdbarch_dump: REG_STRUCT_HAS_ADDR = <0x%08lx>\n",
                         (long) current_gdbarch->reg_struct_has_addr
                         /*REG_STRUCT_HAS_ADDR ()*/);
-#endif
-#ifdef REMOTE_TRANSLATE_XFER_ADDRESS
-#if GDB_MULTI_ARCH
-  /* Macro might contain `[{}]' when not multi-arch */
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len)",
-                      XSTRING (REMOTE_TRANSLATE_XFER_ADDRESS (gdb_addr, gdb_len, rem_addr, rem_len)));
 #endif
   if (GDB_MULTI_ARCH)
     fprintf_unfiltered (file,
-                        "gdbarch_dump: REMOTE_TRANSLATE_XFER_ADDRESS = <0x%08lx>\n",
-                        (long) current_gdbarch->remote_translate_xfer_address
-                        /*REMOTE_TRANSLATE_XFER_ADDRESS ()*/);
-#endif
+                        "gdbarch_dump: remote_translate_xfer_address = 0x%08lx\n",
+                        (long) current_gdbarch->remote_translate_xfer_address);
 #ifdef RETURN_VALUE_ON_STACK
   fprintf_unfiltered (file,
                       "gdbarch_dump: %s # %s\n",
@@ -4766,7 +4756,7 @@ set_gdbarch_function_start_offset (struct gdbarch *gdbarch,
 }
 
 void
-gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
+gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len)
 {
   gdb_assert (gdbarch != NULL);
   if (gdbarch->remote_translate_xfer_address == 0)
@@ -4774,7 +4764,7 @@ gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_ad
                     "gdbarch: gdbarch_remote_translate_xfer_address invalid");
   if (gdbarch_debug >= 2)
     fprintf_unfiltered (gdb_stdlog, "gdbarch_remote_translate_xfer_address called\n");
-  gdbarch->remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len);
+  gdbarch->remote_translate_xfer_address (gdbarch, regcache, gdb_addr, gdb_len, rem_addr, rem_len);
 }
 
 void
index aeb704be267c83d26214e24d261d74e9a0c44ddc..10404a07341a41ef579206279995a59d63ca25d7 100644 (file)
@@ -2261,22 +2261,9 @@ extern void set_gdbarch_function_start_offset (struct gdbarch *gdbarch, CORE_ADD
 #endif
 #endif
 
-/* Default (function) for non- multi-arch platforms. */
-#if (!GDB_MULTI_ARCH) && !defined (REMOTE_TRANSLATE_XFER_ADDRESS)
-#define REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len) (generic_remote_translate_xfer_address (gdb_addr, gdb_len, rem_addr, rem_len))
-#endif
-
-typedef void (gdbarch_remote_translate_xfer_address_ftype) (CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
-extern void gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
+typedef void (gdbarch_remote_translate_xfer_address_ftype) (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
+extern void gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len);
 extern void set_gdbarch_remote_translate_xfer_address (struct gdbarch *gdbarch, gdbarch_remote_translate_xfer_address_ftype *remote_translate_xfer_address);
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) && defined (REMOTE_TRANSLATE_XFER_ADDRESS)
-#error "Non multi-arch definition of REMOTE_TRANSLATE_XFER_ADDRESS"
-#endif
-#if GDB_MULTI_ARCH
-#if (GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL) || !defined (REMOTE_TRANSLATE_XFER_ADDRESS)
-#define REMOTE_TRANSLATE_XFER_ADDRESS(gdb_addr, gdb_len, rem_addr, rem_len) (gdbarch_remote_translate_xfer_address (current_gdbarch, gdb_addr, gdb_len, rem_addr, rem_len))
-#endif
-#endif
 
 extern CORE_ADDR gdbarch_frame_args_skip (struct gdbarch *gdbarch);
 extern void set_gdbarch_frame_args_skip (struct gdbarch *gdbarch, CORE_ADDR frame_args_skip);
index 3a8e1648ec62dbeaf1ba9bec484cc6dfc355e888..47271f9ea4f12fdeba0d3e6d6ac4fdc1a75857e3 100755 (executable)
@@ -606,7 +606,7 @@ v:2:DECR_PC_AFTER_BREAK:CORE_ADDR:decr_pc_after_break::::0:-1
 f:2:PREPARE_TO_PROCEED:int:prepare_to_proceed:int select_it:select_it::0:default_prepare_to_proceed::0
 v:2:FUNCTION_START_OFFSET:CORE_ADDR:function_start_offset::::0:-1
 #
-f:2:REMOTE_TRANSLATE_XFER_ADDRESS:void:remote_translate_xfer_address:CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:gdb_addr, gdb_len, rem_addr, rem_len:::generic_remote_translate_xfer_address::0
+m::REMOTE_TRANSLATE_XFER_ADDRESS:void:remote_translate_xfer_address:struct regcache *regcache, CORE_ADDR gdb_addr, int gdb_len, CORE_ADDR *rem_addr, int *rem_len:regcache, gdb_addr, gdb_len, rem_addr, rem_len:::generic_remote_translate_xfer_address::0
 #
 v:2:FRAME_ARGS_SKIP:CORE_ADDR:frame_args_skip::::0:-1
 f:2:FRAMELESS_FUNCTION_INVOCATION:int:frameless_function_invocation:struct frame_info *fi:fi:::generic_frameless_function_invocation_not::0
index 902cb5fc62d6ef650ea37d21c6827247e5207baa..8a7451e4ad771e18db0c4b2a884b9078829343d1 100644 (file)
@@ -3973,7 +3973,10 @@ remote_xfer_memory (CORE_ADDR mem_addr, char *buffer, int mem_len,
   int targ_len;
   int res;
 
-  REMOTE_TRANSLATE_XFER_ADDRESS (mem_addr, mem_len, &targ_addr, &targ_len);
+  /* Should this be the selected frame?  */
+  gdbarch_remote_translate_xfer_address (current_gdbarch, current_regcache,
+                                        mem_addr, mem_len,
+                                        &targ_addr, &targ_len);
   if (targ_len <= 0)
     return 0;
 
index 9a216a0f3e2f1d62f4d764953abf30ab87840eaf..77a8551a46032d80d2720856b3323b5b3284ea67 100644 (file)
@@ -1,3 +1,9 @@
+2003-05-07  Andrew Cagney  <cagney@redhat.com>
+
+       * sim-d10v.h (sim_d10v_translate_addr): Add regcache parameter.
+       (sim_d10v_translate_imap_addr): Add regcache parameter.
+       (sim_d10v_translate_dmap_addr): Ditto.
+
 2003-03-27  Nick Clifton  <nickc@redhat.com>
 
        * sim-arm.h (sim_arm_regs): Add iWMMXt registers.
index f153a419478cab1cda153ae27b4b6d54dc9d5d4a..8294b14858bbc14603898b37a7016f31cfef9ba2 100644 (file)
@@ -58,20 +58,23 @@ extern unsigned long sim_d10v_translate_dmap_addr
   (unsigned long offset,
    int nr_bytes,
    unsigned long *phys,
-   unsigned long (*dmap_register) (int reg_nr));
+   void *regcache,
+   unsigned long (*dmap_register) (void *regcache, int reg_nr));
 
 extern unsigned long sim_d10v_translate_imap_addr
   (unsigned long offset,
    int nr_bytes,
    unsigned long *phys,
-   unsigned long (*imap_register) (int reg_nr));
+   void *regcache,
+   unsigned long (*imap_register) (void *regcache, int reg_nr));
 
 extern unsigned long sim_d10v_translate_addr
   (unsigned long vaddr,
    int nr_bytes,
    unsigned long *phys,
-   unsigned long (*dmap_register) (int reg_nr),
-   unsigned long (*imap_register) (int reg_nr));
+   void *regcache,
+   unsigned long (*dmap_register) (void *regcache, int reg_nr),
+   unsigned long (*imap_register) (void *regcache, int reg_nr));
 
 
 /* The simulator makes use of the following register information. */
index 54d84e6b028c7f8ca24eecf475e9fe6fc1ab453e..3256284ad4123368bc48f7967aec082dcb21dea0 100644 (file)
@@ -1,3 +1,15 @@
+2003-05-07  Andrew Cagney  <cagney@redhat.com>
+
+       * interp.c (sim_d10v_translate_addr): Add "regcache" parameter.
+       (sim_d10v_translate_imap_addr): Ditto.
+       (sim_d10v_translate_dmap_addr): Ditto.
+       (xfer_mem): Pass NULL regcache to sim_d10v_translate_addr.
+       (dmem_addr): Pass NULL regcache to sim_d10v_translate_dmap_addr.
+       (dmap_register, imap_register): Add "regcache" parameter.
+       (imem_addr): Pass NULL regcache to sim_d10v_translate_imap_addr.
+       (sim_fetch_register): Pass NULL regcache to imap_register and
+       dmap_register.
+
 2003-02-27  Andrew Cagney  <cagney@redhat.com>
 
        * interp.c (sim_open, sim_create_inferior): Rename _bfd to bfd.
index 718acca993670d18bd901d4d7131fa27478f8fe0..30239ab0247a778f7ccb9e267eb4d869fc4afdbc 100644 (file)
@@ -363,7 +363,7 @@ set_dmap_register (int reg_nr, unsigned long value)
 }
 
 static unsigned long
-dmap_register (int reg_nr)
+dmap_register (void *regcache, int reg_nr)
 {
   uint8 *raw = map_memory (SIM_D10V_MEMORY_DATA
                           + DMAP0_OFFSET + 2 * reg_nr);
@@ -386,7 +386,7 @@ set_imap_register (int reg_nr, unsigned long value)
 }
 
 static unsigned long
-imap_register (int reg_nr)
+imap_register (void *regcache, int reg_nr)
 {
   uint8 *raw = map_memory (SIM_D10V_MEMORY_DATA
                           + IMAP0_OFFSET + 2 * reg_nr);
@@ -440,7 +440,9 @@ unsigned long
 sim_d10v_translate_dmap_addr (unsigned long offset,
                              int nr_bytes,
                              unsigned long *phys,
-                             unsigned long (*dmap_register) (int reg_nr))
+                             void *regcache,
+                             unsigned long (*dmap_register) (void *regcache,
+                                                             int reg_nr))
 {
   short map;
   int regno;
@@ -457,7 +459,7 @@ sim_d10v_translate_dmap_addr (unsigned long offset,
       /* Don't cross a BLOCK boundary */
       nr_bytes = DMAP_BLOCK_SIZE - (offset % DMAP_BLOCK_SIZE);
     }
-  map = dmap_register (regno);
+  map = dmap_register (regcache, regno);
   if (regno == 3)
     {
       /* Always maps to data memory */
@@ -498,7 +500,9 @@ unsigned long
 sim_d10v_translate_imap_addr (unsigned long offset,
                              int nr_bytes,
                              unsigned long *phys,
-                             unsigned long (*imap_register) (int reg_nr))
+                             void *regcache,
+                             unsigned long (*imap_register) (void *regcache,
+                                                             int reg_nr))
 {
   short map;
   int regno;
@@ -517,7 +521,7 @@ sim_d10v_translate_imap_addr (unsigned long offset,
       /* Don't cross a BLOCK boundary */
       nr_bytes = IMAP_BLOCK_SIZE - offset;
     }
-  map = imap_register (regno);
+  map = imap_register (regcache, regno);
   sp = (map & 0x3000) >> 12;
   segno = (map & 0x007f);
   switch (sp)
@@ -549,8 +553,11 @@ unsigned long
 sim_d10v_translate_addr (unsigned long memaddr,
                         int nr_bytes,
                         unsigned long *targ_addr,
-                        unsigned long (*dmap_register) (int reg_nr),
-                        unsigned long (*imap_register) (int reg_nr))
+                        void *regcache,
+                        unsigned long (*dmap_register) (void *regcache,
+                                                        int reg_nr),
+                        unsigned long (*imap_register) (void *regcache,
+                                                        int reg_nr))
 {
   unsigned long phys;
   unsigned long seg;
@@ -614,12 +621,12 @@ sim_d10v_translate_addr (unsigned long memaddr,
       break;
 
     case 0x10:                 /* in logical data address segment */
-      nr_bytes = sim_d10v_translate_dmap_addr (off, nr_bytes, &phys,
+      nr_bytes = sim_d10v_translate_dmap_addr (off, nr_bytes, &phys, regcache,
                                               dmap_register);
       break;
 
     case 0x11:                 /* in logical instruction address segment */
-      nr_bytes = sim_d10v_translate_imap_addr (off, nr_bytes, &phys,
+      nr_bytes = sim_d10v_translate_imap_addr (off, nr_bytes, &phys, regcache,
                                               imap_register);
       break;
 
@@ -720,10 +727,8 @@ xfer_mem (SIM_ADDR virt,
       uint8 *memory;
       unsigned long phys;
       int phys_size;
-      phys_size = sim_d10v_translate_addr (virt, size,
-                                          &phys,
-                                          dmap_register,
-                                          imap_register);
+      phys_size = sim_d10v_translate_addr (virt, size, &phys, NULL,
+                                          dmap_register, imap_register);
       if (phys_size == 0)
        return xfered;
 
@@ -892,7 +897,7 @@ dmem_addr (uint16 offset)
      things like ``0xfffe + 0x0e60 == 0x10e5d''.  Since offset's type
      is uint16 this is modulo'ed onto 0x0e5d. */
 
-  phys_size = sim_d10v_translate_dmap_addr (offset, 1, &phys,
+  phys_size = sim_d10v_translate_dmap_addr (offset, 1, &phys, NULL,
                                            dmap_register);
   if (phys_size == 0)
     {
@@ -919,7 +924,8 @@ imem_addr (uint32 offset)
 {
   unsigned long phys;
   uint8 *mem;
-  int phys_size = sim_d10v_translate_imap_addr (offset, 1, &phys, imap_register);
+  int phys_size = sim_d10v_translate_imap_addr (offset, 1, &phys, NULL,
+                                               imap_register);
   if (phys_size == 0)
     {
       return State.mem.fault;
@@ -1367,14 +1373,14 @@ sim_fetch_register (sd, rn, memory, length)
       break;
     case SIM_D10V_IMAP0_REGNUM:
     case SIM_D10V_IMAP1_REGNUM:
-      WRITE_16 (memory, imap_register (rn - SIM_D10V_IMAP0_REGNUM));
+      WRITE_16 (memory, imap_register (NULL, rn - SIM_D10V_IMAP0_REGNUM));
       size = 2;
       break;
     case SIM_D10V_DMAP0_REGNUM:
     case SIM_D10V_DMAP1_REGNUM:
     case SIM_D10V_DMAP2_REGNUM:
     case SIM_D10V_DMAP3_REGNUM:
-      WRITE_16 (memory, dmap_register (rn - SIM_D10V_DMAP0_REGNUM));
+      WRITE_16 (memory, dmap_register (NULL, rn - SIM_D10V_DMAP0_REGNUM));
       size = 2;
       break;
     case SIM_D10V_TS2_DMAP_REGNUM: