This is the mail archive of the gdb-patches@sourceware.org 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: Check memory accesses


On Wed, Nov 15, 2006 at 03:24:07PM +0300, Vladimir Prus wrote:
> +  /* region->hi means there's no upper bound. */
> +  if (memaddr + len < region->hi || region->hi == 0)

"region->hi == 0", you mean (in the comment)?  Also, two spaces after
period.

> +++ gdb/memattr.c	(/patches/gdb/memcheck/gdb_mainline)	(revision 2094)
> @@ -29,6 +29,7 @@
>  #include "language.h"
>  #include "vec.h"
>  #include "gdb_string.h"
> +#include "gdb_locale.h"

Shouldn't need this?  It's part of defs.h (deliberately, since
everywhere should use _()).

>        if (m->enabled_p == 1)
>  	{
> +	  /* If address is in memory return, return that memory range.  */

I think you mean "if the adderss is in the memory region".

> +  /* When no memory map is defined at all, we always set 'default_mem_attrib',
> +     so that we do not make the all memory inaccessible for targets that don't
> +     provide a memory map.  */

Always return, rather than "always set"?  Also, "make all memory".


-- 
Daniel Jacobowitz
CodeSourcery


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