aboutsummaryrefslogtreecommitdiff
path: root/gdb/memattr.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-08-27 08:58:01 +0000
committerPedro Alves <palves@redhat.com>2012-08-27 08:58:01 +0000
commit1591a1e8523aff54250fd7376b0ceeb83e5f2b15 (patch)
treef13bdd89527a676bbd1afe716bf354a71cabab3e /gdb/memattr.c
parentf4b8daea2addae0f9bc702040c2381d69fb35fb8 (diff)
downloadgdb-1591a1e8523aff54250fd7376b0ceeb83e5f2b15.zip
gdb-1591a1e8523aff54250fd7376b0ceeb83e5f2b15.tar.gz
gdb-1591a1e8523aff54250fd7376b0ceeb83e5f2b15.tar.bz2
2012-08-27 Wei-cheng Wang <cole945@gmail.com>
* memattr.c (create_mem_region): Fix memory region overlapping checking. 2012-08-27 Wei-cheng Wang <cole945@gmail.com> Yao Qi <yao@codesourcery.com> Pedro Alves <palves@redhat.com> * gdb.base/memattr.exp (delete_memory, region_pass, region_fail): New procedures. (top level): Add overlap checking tests.
Diffstat (limited to 'gdb/memattr.c')
-rw-r--r--gdb/memattr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/memattr.c b/gdb/memattr.c
index ec7deb5..bd92f1d 100644
--- a/gdb/memattr.c
+++ b/gdb/memattr.c
@@ -207,7 +207,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;