/* Memory attributes support, for GDB.
- Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GDB.
/* If this flag is set, gdb will assume that memory ranges not
specified by the memory map have type MEM_NONE, and will
emit errors on all accesses to that memory. */
-static int inaccessible_by_default = 0;
+static int inaccessible_by_default = 1;
static void
show_inaccessible_by_default (struct ui_file *file, int from_tty,
void
invalidate_target_mem_regions (void)
{
- struct mem_region *m;
- int ix;
-
if (!target_mem_regions_valid)
return;
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");
for (ix = 0; VEC_iterate (mem_region_s, mem_region_list, ix, m); ix++)
{
char *tmp;
+
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";
- else
- tmp = hex_string_custom ((unsigned long) m->hi, 8);
+ if (m->hi == 0)
+ tmp = "0x100000000";
+ else
+ tmp = hex_string_custom ((unsigned long) m->hi, 8);
}
else
{
- if (m->hi == 0)
- tmp = "0x10000000000000000";
- else
- tmp = hex_string_custom ((unsigned long) m->hi, 16);
+ if (m->hi == 0)
+ tmp = "0x10000000000000000";
+ else
+ tmp = hex_string_custom ((unsigned long) m->hi, 16);
}
printf_filtered ("%s ", tmp);
require_user_regions (from_tty);
- dcache_invalidate (target_dcache);
+ target_dcache_invalidate ();
if (p == 0)
{
require_user_regions (from_tty);
- dcache_invalidate (target_dcache);
+ target_dcache_invalidate ();
if (p == 0)
{
static void
mem_delete (int num)
{
- struct mem_region *m1, *m;
+ struct mem_region *m;
int ix;
if (!mem_region_list)
require_user_regions (from_tty);
- dcache_invalidate (target_dcache);
+ target_dcache_invalidate ();
if (p == 0)
{
- if (query ("Delete all memory regions? "))
+ if (query (_("Delete all memory regions? ")))
mem_clear ();
dont_repeat ();
return;