Avoid software breakpoint's instruction shadow inconsistency
[deliverable/binutils-gdb.git] / gdb / ia64-tdep.c
index 7d440e4f0ad36979485e7c2cf9ab93643774da0a..85f2b9af25dab15cdbc8d1e0d20e9c41541ad8b4 100644 (file)
@@ -1,6 +1,6 @@
 /* Target-dependent code for the IA-64 for GDB, the GNU debugger.
 
-   Copyright (C) 1999-2013 Free Software Foundation, Inc.
+   Copyright (C) 1999-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -30,7 +30,6 @@
 #include "frame-unwind.h"
 #include "doublest.h"
 #include "value.h"
-#include "gdb_assert.h"
 #include "objfiles.h"
 #include "elf/common.h"                /* for DT_PLTGOT value */
 #include "elf-bfd.h"
@@ -638,7 +637,7 @@ static int
 ia64_memory_insert_breakpoint (struct gdbarch *gdbarch,
                               struct bp_target_info *bp_tgt)
 {
-  CORE_ADDR addr = bp_tgt->placed_address;
+  CORE_ADDR addr = bp_tgt->placed_address = bp_tgt->reqstd_address;
   gdb_byte bundle[BUNDLE_LEN];
   int slotnum = (int) (addr & 0x0f) / SLOT_MULTIPLIER, shadow_slotnum;
   long long instr_breakpoint;
@@ -2558,7 +2557,7 @@ ia64_access_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum,
   /* We never call any libunwind routines that need to write registers.  */
   gdb_assert (!write);
 
-  get_frame_register (this_frame, regnum, (char *) val);
+  get_frame_register (this_frame, regnum, (gdb_byte *) val);
 
   return 0;
 }
@@ -2639,7 +2638,7 @@ ia64_access_rse_fpreg (unw_addr_space_t as, unw_regnum_t uw_regnum,
   /* We never call any libunwind routines that need to write registers.  */
   gdb_assert (!write);
 
-  regcache_cooked_read (regcache, regnum, (char *) val);
+  regcache_cooked_read (regcache, regnum, (gdb_byte *) val);
 
   return 0;
 }
@@ -2664,9 +2663,9 @@ ia64_access_mem (unw_addr_space_t as,
 
   /* XXX do we need to normalize byte-order here?  */
   if (write)
-    return target_write_memory (addr, (char *) val, sizeof (unw_word_t));
+    return target_write_memory (addr, (gdb_byte *) val, sizeof (unw_word_t));
   else
-    return target_read_memory (addr, (char *) val, sizeof (unw_word_t));
+    return target_read_memory (addr, (gdb_byte *) val, sizeof (unw_word_t));
 }
 
 /* Call low-level function to access the kernel unwind table.  */
@@ -3655,7 +3654,8 @@ ia64_convert_from_func_ptr_addr (struct gdbarch *gdbarch, CORE_ADDR addr,
 
       minsym = lookup_minimal_symbol_by_pc (addr);
 
-      if (minsym.minsym && is_vtable_name (SYMBOL_LINKAGE_NAME (minsym.minsym)))
+      if (minsym.minsym
+         && is_vtable_name (MSYMBOL_LINKAGE_NAME (minsym.minsym)))
        return read_memory_unsigned_integer (addr, 8, byte_order);
     }
 
This page took 0.024476 seconds and 4 git commands to generate.