* gdb.opt/clobbered-registers-O2.c: New testcase source file.
[deliverable/binutils-gdb.git] / gdb / m32c-tdep.c
index 5763d5c0676932c39210b37c3518fd5ed49f330e..49d07ce5cc0057e51eb6078838f42ec5a10daa17 100644 (file)
@@ -6,7 +6,7 @@
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
+   the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
 
    This program is distributed in the hope that it will be useful,
@@ -15,9 +15,7 @@
    GNU General Public License for more details.
 
    You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
 #include "defs.h"
 
@@ -2319,10 +2317,10 @@ m32c_return_value (struct gdbarch *gdbarch,
    their program is calling, not in some trampoline code they've never
    seen before.)
 
-   The SKIP_TRAMPOLINE_CODE gdbarch method tells GDB how to step
+   The gdbarch_skip_trampoline_code method tells GDB how to step
    through such trampoline functions transparently to the user.  When
    given the address of a trampoline function's first instruction,
-   SKIP_TRAMPOLINE_CODE should return the address of the first
+   gdbarch_skip_trampoline_code should return the address of the first
    instruction of the function really being called.  If GDB decides it
    wants to step into that function, it will set a breakpoint there
    and silently continue to it.
@@ -2332,7 +2330,7 @@ m32c_return_value (struct gdbarch *gdbarch,
    code sequence seems more fragile.  */
 
 static CORE_ADDR
-m32c_skip_trampoline_code (CORE_ADDR stop_pc)
+m32c_skip_trampoline_code (struct frame_info *frame, CORE_ADDR stop_pc)
 {
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
 
@@ -2535,6 +2533,7 @@ m32c_virtual_frame_pointer (CORE_ADDR pc,
   CORE_ADDR func_addr, func_end, sal_end;
   struct m32c_prologue p;
 
+  struct regcache *regcache = get_current_regcache ();
   struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch);
   
   if (!find_pc_partial_function (pc, &name, &func_addr, &func_end))
@@ -2544,15 +2543,15 @@ m32c_virtual_frame_pointer (CORE_ADDR pc,
   switch (p.kind)
     {
     case prologue_with_frame_ptr:
-      *frame_regnum = m32c_banked_register (tdep->fb, current_regcache)->num;
+      *frame_regnum = m32c_banked_register (tdep->fb, regcache)->num;
       *frame_offset = p.frame_ptr_offset;
       break;
     case prologue_sans_frame_ptr:
-      *frame_regnum = m32c_banked_register (tdep->sp, current_regcache)->num;
+      *frame_regnum = m32c_banked_register (tdep->sp, regcache)->num;
       *frame_offset = p.frame_size;
       break;
     default:
-      *frame_regnum = m32c_banked_register (tdep->sp, current_regcache)->num;
+      *frame_regnum = m32c_banked_register (tdep->sp, regcache)->num;
       *frame_offset = 0;
       break;
     }
This page took 0.024239 seconds and 4 git commands to generate.