2008-03-25 Pedro Alves <pedro@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / m32r-tdep.c
index 43c58526fbc3fc60cee56c26cdc74b3646710c96..8085b86fff71338a8c417c24e25379f4ae3f0b95 100644 (file)
@@ -1,7 +1,7 @@
 /* Target-dependent code for Renesas M32R, for GDB.
 
-   Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
-   Free Software Foundation, Inc.
+   Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007,
+   2008 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -79,7 +79,8 @@ m32r_frame_align (struct gdbarch *gdbarch, CORE_ADDR sp)
    The following functions take care of this behavior. */
 
 static int
-m32r_memory_insert_breakpoint (struct bp_target_info *bp_tgt)
+m32r_memory_insert_breakpoint (struct gdbarch *gdbarch,
+                              struct bp_target_info *bp_tgt)
 {
   CORE_ADDR addr = bp_tgt->placed_address;
   int val;
@@ -95,7 +96,7 @@ m32r_memory_insert_breakpoint (struct bp_target_info *bp_tgt)
   bp_tgt->placed_size = bp_tgt->shadow_len = 4;
 
   /* Determine appropriate breakpoint contents and size for this address.  */
-  if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
+  if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
     {
       if ((addr & 3) == 0)
        {
@@ -136,7 +137,8 @@ m32r_memory_insert_breakpoint (struct bp_target_info *bp_tgt)
 }
 
 static int
-m32r_memory_remove_breakpoint (struct bp_target_info *bp_tgt)
+m32r_memory_remove_breakpoint (struct gdbarch *gdbarch,
+                              struct bp_target_info *bp_tgt)
 {
   CORE_ADDR addr = bp_tgt->placed_address;
   int val;
@@ -149,7 +151,7 @@ m32r_memory_remove_breakpoint (struct bp_target_info *bp_tgt)
   buf[3] = contents_cache[3];
 
   /* Remove parallel bit.  */
-  if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
+  if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
     {
       if ((buf[0] & 0x80) == 0 && (buf[2] & 0x80) != 0)
        buf[2] &= 0x7f;
@@ -166,14 +168,14 @@ m32r_memory_remove_breakpoint (struct bp_target_info *bp_tgt)
 }
 
 static const gdb_byte *
-m32r_breakpoint_from_pc (CORE_ADDR *pcptr, int *lenptr)
+m32r_breakpoint_from_pc (struct gdbarch *gdbarch, CORE_ADDR *pcptr, int *lenptr)
 {
   static gdb_byte be_bp_entry[] = { 0x10, 0xf1, 0x70, 0x00 };  /* dpt -> nop */
   static gdb_byte le_bp_entry[] = { 0x00, 0x70, 0xf1, 0x10 };  /* dpt -> nop */
   gdb_byte *bp;
 
   /* Determine appropriate breakpoint.  */
-  if (gdbarch_byte_order (current_gdbarch) == BFD_ENDIAN_BIG)
+  if (gdbarch_byte_order (gdbarch) == BFD_ENDIAN_BIG)
     {
       if ((*pcptr & 3) == 0)
        {
@@ -448,7 +450,7 @@ decode_prologue (CORE_ADDR start_pc, CORE_ADDR scan_limit,
 #define DEFAULT_SEARCH_LIMIT 128
 
 CORE_ADDR
-m32r_skip_prologue (CORE_ADDR pc)
+m32r_skip_prologue (struct gdbarch *gdbarch, CORE_ADDR pc)
 {
   CORE_ADDR func_addr, func_end;
   struct symtab_and_line sal;
This page took 0.027182 seconds and 4 git commands to generate.