Merge from gcc:
[deliverable/binutils-gdb.git] / gdb / xtensa-tdep.c
index e2be9f399f44a8185dd7a18410fb12b57d096f05..ae62be02f64e59a9d4912dd21c63a4c8a946510a 100644 (file)
@@ -303,18 +303,17 @@ xtensa_register_type (struct gdbarch *gdbarch, int regnum)
    to n for An.  So, we only have to add the base number for A0.  */
 
 static int
-xtensa_reg_to_regnum (int regnum)
+xtensa_reg_to_regnum (struct gdbarch *gdbarch, int regnum)
 {
   int i;
 
   if (regnum >= 0 && regnum < 16)
-    return gdbarch_tdep (current_gdbarch)->a0_base + regnum;
+    return gdbarch_tdep (gdbarch)->a0_base + regnum;
 
   for (i = 0;
-       i < gdbarch_num_regs (current_gdbarch)
-          + gdbarch_num_pseudo_regs (current_gdbarch);
+       i < gdbarch_num_regs (gdbarch) + gdbarch_num_pseudo_regs (gdbarch);
        i++)
-    if (regnum == gdbarch_tdep (current_gdbarch)->regmap[i].target_number)
+    if (regnum == gdbarch_tdep (gdbarch)->regmap[i].target_number)
       return i;
 
   internal_error (__FILE__, __LINE__,
@@ -854,7 +853,7 @@ xtensa_regset_from_core_section (struct gdbarch *core_arch,
 {
   DEBUGTRACE ("xtensa_regset_from_core_section "
              "(..., sect_name==\"%s\", sect_size==%x) \n",
-             sect_name, sect_size);
+             sect_name, (unsigned int) sect_size);
 
   if (strcmp (sect_name, ".reg") == 0
       && sect_size >= sizeof(xtensa_elf_gregset_t))
@@ -1169,8 +1168,8 @@ xtensa_frame_this_id (struct frame_info *next_frame,
     xtensa_frame_cache (next_frame, this_cache);
   struct frame_id id;
 
-  DEBUGTRACE ("xtensa_frame_this_id (next 0x%08x, *this 0x%08x)\n",
-             (unsigned int) next_frame, (unsigned int) *this_cache);
+  DEBUGTRACE ("xtensa_frame_this_id (next 0x%lx, *this 0x%lx)\n",
+             (unsigned long) next_frame, (unsigned long) *this_cache);
 
   if (cache->prev_sp == 0)
     return;
@@ -1250,10 +1249,10 @@ xtensa_frame_prev_register (struct frame_info *next_frame,
   CORE_ADDR saved_reg = 0;
   int done = 1;
 
-  DEBUGTRACE ("xtensa_frame_prev_register (next 0x%08x, "
-             "*this 0x%08x, regnum %d (%s), ...)\n",
-             (unsigned int) next_frame,
-             *this_cache ? (unsigned int) *this_cache : 0, regnum,
+  DEBUGTRACE ("xtensa_frame_prev_register (next 0x%lx, "
+             "*this 0x%lx, regnum %d (%s), ...)\n",
+             (unsigned long) next_frame,
+             *this_cache ? (unsigned long) *this_cache : 0, regnum,
              xtensa_register_name (gdbarch, regnum));
 
   if (regnum ==gdbarch_pc_regnum (gdbarch))
@@ -1590,8 +1589,8 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch,
         {
          struct value *arg = args[i];
          struct type *arg_type = check_typedef (value_type (arg));
-         fprintf_unfiltered (gdb_stdlog, "%2d: 0x%08x %3d ",
-                             i, (int) arg, TYPE_LENGTH (arg_type));
+         fprintf_unfiltered (gdb_stdlog, "%2d: 0x%lx %3d ",
+                             i, (unsigned long) arg, TYPE_LENGTH (arg_type));
          switch (TYPE_CODE (arg_type))
            {
            case TYPE_CODE_INT:
@@ -1604,8 +1603,8 @@ xtensa_push_dummy_call (struct gdbarch *gdbarch,
              fprintf_unfiltered (gdb_stdlog, "%3d", TYPE_CODE (arg_type));
              break;
            }
-         fprintf_unfiltered (gdb_stdlog, " 0x%08x\n",
-                             (unsigned int) value_contents (arg));
+         fprintf_unfiltered (gdb_stdlog, " 0x%lx\n",
+                             (unsigned long) value_contents (arg));
        }
     }
 
This page took 0.024858 seconds and 4 git commands to generate.