2010-05-14 Michael Snyder <msnyder@vmware.com>
[deliverable/binutils-gdb.git] / gdb / memattr.c
index 5b52f8505721922ab935ea934912e22858d87de0..3fcc45eb6dca3458d5d44ec6f4ace5aaa58440ca 100644 (file)
@@ -1,6 +1,6 @@
 /* Memory attributes support, for GDB.
 
-   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
    This file is part of GDB.
@@ -292,9 +292,6 @@ lookup_mem_region (CORE_ADDR addr)
 void
 invalidate_target_mem_regions (void)
 {
-  struct mem_region *m;
-  int ix;
-
   if (!target_mem_regions_valid)
     return;
 
@@ -432,10 +429,10 @@ mem_info_command (char *args, int from_tty)
   printf_filtered ("Num ");
   printf_filtered ("Enb ");
   printf_filtered ("Low Addr   ");
-  if (gdbarch_addr_bit (current_gdbarch) > 32)
+  if (gdbarch_addr_bit (target_gdbarch) > 32)
     printf_filtered ("        ");
   printf_filtered ("High Addr  ");
-  if (gdbarch_addr_bit (current_gdbarch) > 32)
+  if (gdbarch_addr_bit (target_gdbarch) > 32)
     printf_filtered ("        ");
   printf_filtered ("Attrs ");
   printf_filtered ("\n");
@@ -446,14 +443,14 @@ mem_info_command (char *args, int from_tty)
       printf_filtered ("%-3d %-3c\t",
                       m->number,
                       m->enabled_p ? 'y' : 'n');
-      if (gdbarch_addr_bit (current_gdbarch) <= 32)
+      if (gdbarch_addr_bit (target_gdbarch) <= 32)
        tmp = hex_string_custom ((unsigned long) m->lo, 8);
       else
        tmp = hex_string_custom ((unsigned long) m->lo, 16);
       
       printf_filtered ("%s ", tmp);
 
-      if (gdbarch_addr_bit (current_gdbarch) <= 32)
+      if (gdbarch_addr_bit (target_gdbarch) <= 32)
        {
        if (m->hi == 0)
          tmp = "0x100000000";
@@ -571,7 +568,7 @@ mem_enable_command (char *args, int from_tty)
 
   require_user_regions (from_tty);
 
-  dcache_invalidate (target_dcache);
+  target_dcache_invalidate ();
 
   if (p == 0)
     {
@@ -625,7 +622,7 @@ mem_disable_command (char *args, int from_tty)
 
   require_user_regions (from_tty);
 
-  dcache_invalidate (target_dcache);
+  target_dcache_invalidate ();
 
   if (p == 0)
     {
@@ -655,7 +652,7 @@ mem_disable_command (char *args, int from_tty)
 static void
 mem_delete (int num)
 {
-  struct mem_region *m1, *m;
+  struct mem_region *m;
   int ix;
 
   if (!mem_region_list)
@@ -686,7 +683,7 @@ mem_delete_command (char *args, int from_tty)
 
   require_user_regions (from_tty);
 
-  dcache_invalidate (target_dcache);
+  target_dcache_invalidate ();
 
   if (p == 0)
     {
This page took 0.024335 seconds and 4 git commands to generate.