This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Small memattr fix


> The following patch fixes gdb's bogus complaint that 
> 
> 	mem 0x0 0x04 ...
> 
> overlaps with 
> 
> 	mem 0x4 0x08 ...

Hmm, checking:

    http://sources.redhat.com/gdb/current/onlinedocs/gdb_9.html#IDX375

it indicates that the upper bound is exclusive (see under `info mem') so 
yes definitly, good catch.

Perhaphs [separate problem] the doco should mention this earlier and 
more clearly?

enjoy,
Andrew

> 2002-05-30  Don Howard  <dhoward@redhat.com>
> 
> 	* memattr.c (create_mem_region): Don't include upper address in
> 	test for overlapping mem regions.
> 
> Index: memattr.c
> ===================================================================
> RCS file: /cvs/cvsfiles/devo/gdb/memattr.c,v
> retrieving revision 2.5.22.1
> diff -p -u -w -r2.5.22.1 memattr.c
> --- memattr.c   2002/02/05 00:31:36     2.5.22.1
> +++ memattr.c   2002/05/31 00:55:20
> @@ -55,8 +55,8 @@ create_mem_region (CORE_ADDR lo, CORE_AD
>    while (n)
>      {
>        /* overlapping node */
> -      if ((lo >= n->lo && lo <= n->hi) ||
> -         (hi >= n->lo && hi <= n->hi))
> +      if ((lo >= n->lo && lo < n->hi) ||
> +         (hi > n->lo && hi <= n->hi))
>         {
>           printf_unfiltered ("overlapping memory region\n");
>           return NULL;



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]