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]

[Patch] Another small memattr fix.


The following patch fixes a buglet involving memory regions.  

(gdb) mem 0 4 32 wo
(gdb) mem 0xfffffff0 0x100000000 32 wo
invalid memory region: low >= high


2002-06-12  Don Howard  <dhoward@redhat.com>

	* memattr.c (create_mem_region): Permit max addr+1 for upper bound
	of memory regions.


Index: gdb/memattr.c
===================================================================
RCS file: /cvs/src/src/gdb/memattr.c,v
retrieving revision 1.11
diff -p -u -w -r1.11 memattr.c
--- gdb/memattr.c       12 May 2002 04:20:05 -0000      1.11
+++ gdb/memattr.c       12 Jun 2002 23:16:20 -0000
@@ -47,7 +47,7 @@ create_mem_region (CORE_ADDR lo, CORE_AD
   struct mem_region *n, *new;

   /* lo == hi is a useless empty region */
-  if (lo >= hi)
+  if (lo > hi-1)
     {
       printf_unfiltered ("invalid memory region: low >= high\n");


-- 
dhoward@redhat.com
gdb engineering





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