mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-19 22:03:57 +08:00
From 2002-01-18 Greg McGary <greg@mcgary.org>:
* (create_mem_region): Disallow useless empty region. Regions are half-open intervals, so allow [A..B) [B..C) as non-overlapping.
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
2002-02-13 Andrew Cagney <ac131313@redhat.com>
|
||||||
|
|
||||||
|
From 2002-01-18 Greg McGary <greg@mcgary.org>:
|
||||||
|
* (create_mem_region): Disallow useless empty region. Regions are
|
||||||
|
half-open intervals, so allow [A..B) [B..C) as non-overlapping.
|
||||||
|
|
||||||
2002-02-13 Michael Chastain <mec@shout.net>
|
2002-02-13 Michael Chastain <mec@shout.net>
|
||||||
|
|
||||||
* defs.h: Kill CONST_PTR.
|
* defs.h: Kill CONST_PTR.
|
||||||
|
@ -45,9 +45,10 @@ create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
|
|||||||
{
|
{
|
||||||
struct mem_region *n, *new;
|
struct mem_region *n, *new;
|
||||||
|
|
||||||
if (lo > hi)
|
/* lo == hi is a useless empty region */
|
||||||
|
if (lo >= hi)
|
||||||
{
|
{
|
||||||
printf_unfiltered ("invalid memory region\n");
|
printf_unfiltered ("invalid memory region: low >= high\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,8 +56,8 @@ create_mem_region (CORE_ADDR lo, CORE_ADDR hi,
|
|||||||
while (n)
|
while (n)
|
||||||
{
|
{
|
||||||
/* overlapping node */
|
/* overlapping node */
|
||||||
if ((lo >= n->lo && lo <= n->hi) ||
|
if ((lo >= n->lo && lo < n->hi) ||
|
||||||
(hi >= n->lo && hi <= n->hi))
|
(hi > n->lo && hi <= n->hi))
|
||||||
{
|
{
|
||||||
printf_unfiltered ("overlapping memory region\n");
|
printf_unfiltered ("overlapping memory region\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user