Add lost bit of previous commit.
[deliverable/binutils-gdb.git] / gdb / m32c-tdep.c
index 2e837e8441fc24bfa9055c1c5f914b032623eaeb..fa7b465740e8d2b73f6f32fb4fe1b871faa2023e 100644 (file)
@@ -1,6 +1,6 @@
 /* Renesas M32C target-dependent code for GDB, the GNU debugger.
 
-   Copyright 2004, 2005, 2007 Free Software Foundation, Inc.
+   Copyright 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -241,16 +241,16 @@ m32c_register_type (struct gdbarch *arch, int reg_nr)
 
 
 static int
-m32c_register_sim_regno (int reg_nr)
+m32c_register_sim_regno (struct gdbarch *gdbarch, int reg_nr)
 {
-  return gdbarch_tdep (current_gdbarch)->regs[reg_nr].sim_num;
+  return gdbarch_tdep (gdbarch)->regs[reg_nr].sim_num;
 }
 
 
 static int
-m32c_debug_info_reg_to_regnum (int reg_nr)
+m32c_debug_info_reg_to_regnum (struct gdbarch *gdbarch, int reg_nr)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch);
   if (0 <= reg_nr && reg_nr <= M32C_MAX_DWARF_REGNUM
       && tdep->dwarf_regs[reg_nr])
     return tdep->dwarf_regs[reg_nr]->num;
@@ -1803,7 +1803,7 @@ m32c_analyze_prologue (struct gdbarch *arch,
 
 
 static CORE_ADDR
-m32c_skip_prologue (CORE_ADDR ip)
+m32c_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR ip)
 {
   char *name;
   CORE_ADDR func_addr, func_end, sal_end;
@@ -1814,7 +1814,7 @@ m32c_skip_prologue (CORE_ADDR ip)
     return ip;
 
   /* Find end by prologue analysis.  */
-  m32c_analyze_prologue (current_gdbarch, ip, func_end, &p);
+  m32c_analyze_prologue (gdbarch, ip, func_end, &p);
   /* Find end by line info.  */
   sal_end = skip_prologue_using_sal (ip);
   /* Return whichever is lower.  */
@@ -2198,6 +2198,7 @@ m32c_return_by_passed_buf (struct type *type)
 
 static enum return_value_convention
 m32c_return_value (struct gdbarch *gdbarch,
+                  struct type *func_type,
                   struct type *valtype,
                   struct regcache *regcache,
                   gdb_byte *readbuf,
@@ -2332,7 +2333,7 @@ m32c_return_value (struct gdbarch *gdbarch,
 static CORE_ADDR
 m32c_skip_trampoline_code (struct frame_info *frame, CORE_ADDR stop_pc)
 {
-  struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
+  struct gdbarch_tdep *tdep = gdbarch_tdep (get_frame_arch (frame));
 
   /* It would be nicer to simply look up the addresses of known
      trampolines once, and then compare stop_pc with them.  However,
This page took 0.028441 seconds and 4 git commands to generate.