Index: gdb/memattr.c |
diff --git a/gdb/memattr.c b/gdb/memattr.c |
index ec7deb5f54f84942be853714280fd946cb3f0327..c31dbfe073a66d32d057f5c8d0d1ee80c4dbce3f 100644 |
--- a/gdb/memattr.c |
+++ b/gdb/memattr.c |
@@ -1,6 +1,6 @@ |
/* Memory attributes support, for GDB. |
- Copyright (C) 2001-2012 Free Software Foundation, Inc. |
+ Copyright (C) 2001-2013 Free Software Foundation, Inc. |
This file is part of GDB. |
@@ -22,10 +22,11 @@ |
#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 <string.h> |
#include "breakpoint.h" |
#include "cli/cli-utils.h" |
@@ -207,7 +208,7 @@ create_mem_region (CORE_ADDR lo, CORE_ADDR hi, |
if ((lo >= n->lo && (lo < n->hi || n->hi == 0)) |
|| (hi > n->lo && (hi <= n->hi || n->hi == 0)) |
- || (lo <= n->lo && (hi >= n->hi || hi == 0))) |
+ || (lo <= n->lo && ((hi >= n->hi && n->hi != 0) || hi == 0))) |
{ |
printf_unfiltered (_("overlapping memory region\n")); |
return; |
@@ -431,10 +432,10 @@ mem_info_command (char *args, int from_tty) |
printf_filtered ("Num "); |
printf_filtered ("Enb "); |
printf_filtered ("Low Addr "); |
- if (gdbarch_addr_bit (target_gdbarch) > 32) |
+ if (gdbarch_addr_bit (target_gdbarch ()) > 32) |
printf_filtered (" "); |
printf_filtered ("High Addr "); |
- if (gdbarch_addr_bit (target_gdbarch) > 32) |
+ if (gdbarch_addr_bit (target_gdbarch ()) > 32) |
printf_filtered (" "); |
printf_filtered ("Attrs "); |
printf_filtered ("\n"); |
@@ -446,14 +447,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 (target_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 (target_gdbarch) <= 32) |
+ if (gdbarch_addr_bit (target_gdbarch ()) <= 32) |
{ |
if (m->hi == 0) |
tmp = "0x100000000"; |