[ARC] Fix typo in extension instruction name.
[deliverable/binutils-gdb.git] / gdb / memattr.c
index 5c2adaa0263da08a0b1e597b8f30af1ea117f27a..c4a3b75d082b7b56dc61ee4a80b62c6c9d07be6a 100644 (file)
@@ -1,6 +1,6 @@
 /* Memory attributes support, for GDB.
 
-   Copyright (C) 2001-2013 Free Software Foundation, Inc.
+   Copyright (C) 2001-2016 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
 #include "gdbcmd.h"
 #include "memattr.h"
 #include "target.h"
+#include "target-dcache.h"
 #include "value.h"
 #include "language.h"
 #include "vec.h"
-#include "gdb_string.h"
 #include "breakpoint.h"
 #include "cli/cli-utils.h"
 
@@ -98,8 +98,8 @@ mem_region_lessthan (const struct mem_region *lhs,
 int
 mem_region_cmp (const void *untyped_lhs, const void *untyped_rhs)
 {
-  const struct mem_region *lhs = untyped_lhs;
-  const struct mem_region *rhs = untyped_rhs;
+  const struct mem_region *lhs = (const struct mem_region *) untyped_lhs;
+  const struct mem_region *rhs = (const struct mem_region *) untyped_rhs;
 
   if (lhs->lo < rhs->lo)
     return -1;
@@ -112,11 +112,11 @@ mem_region_cmp (const void *untyped_lhs, const void *untyped_rhs)
 /* Allocate a new memory region, with default settings.  */
 
 void
-mem_region_init (struct mem_region *new)
+mem_region_init (struct mem_region *newobj)
 {
-  memset (new, 0, sizeof (struct mem_region));
-  new->enabled_p = 1;
-  new->attrib = default_mem_attrib;
+  memset (newobj, 0, sizeof (struct mem_region));
+  newobj->enabled_p = 1;
+  newobj->attrib = default_mem_attrib;
 }
 
 /* This function should be called before any command which would
@@ -174,7 +174,7 @@ static void
 create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
                   const struct mem_attrib *attrib)
 {
-  struct mem_region new;
+  struct mem_region newobj;
   int i, ix;
 
   /* lo == hi is a useless empty region.  */
@@ -184,11 +184,11 @@ create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
       return;
     }
 
-  mem_region_init (&new);
-  new.lo = lo;
-  new.hi = hi;
+  mem_region_init (&newobj);
+  newobj.lo = lo;
+  newobj.hi = hi;
 
-  ix = VEC_lower_bound (mem_region_s, mem_region_list, &new,
+  ix = VEC_lower_bound (mem_region_s, mem_region_list, &newobj,
                        mem_region_lessthan);
 
   /* Check for an overlapping memory region.  We only need to check
@@ -214,9 +214,9 @@ create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
        }
     }
 
-  new.number = ++mem_number;
-  new.attrib = *attrib;
-  VEC_safe_insert (mem_region_s, mem_region_list, ix, &new);
+  newobj.number = ++mem_number;
+  newobj.attrib = *attrib;
+  VEC_safe_insert (mem_region_s, mem_region_list, ix, &newobj);
 }
 
 /*
@@ -447,9 +447,9 @@ mem_info_command (char *args, int from_tty)
                       m->number,
                       m->enabled_p ? 'y' : 'n');
       if (gdbarch_addr_bit (target_gdbarch ()) <= 32)
-       tmp = hex_string_custom ((unsigned long) m->lo, 8);
+       tmp = hex_string_custom (m->lo, 8);
       else
-       tmp = hex_string_custom ((unsigned long) m->lo, 16);
+       tmp = hex_string_custom (m->lo, 16);
       
       printf_filtered ("%s ", tmp);
 
@@ -458,14 +458,14 @@ mem_info_command (char *args, int from_tty)
          if (m->hi == 0)
            tmp = "0x100000000";
          else
-           tmp = hex_string_custom ((unsigned long) m->hi, 8);
+           tmp = hex_string_custom (m->hi, 8);
        }
       else
        {
          if (m->hi == 0)
            tmp = "0x10000000000000000";
          else
-           tmp = hex_string_custom ((unsigned long) m->hi, 16);
+           tmp = hex_string_custom (m->hi, 16);
        }
 
       printf_filtered ("%s ", tmp);
This page took 0.041075 seconds and 4 git commands to generate.