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]

[patch] Turn on inaccessible-by-default by default.


Hi,

Attached is a patch to turn on inaccessible-by-default by default if
the user supplies the memory map.

This prevents gdb from wandering into memory regions that are not
defined when at least one memory region is defined.

OK to apply?

Kazu Hirata

2007-09-26  Kazu Hirata  <kazu@codesourcery.com>

	* doc/gdb.texinfo: Mention that inaccessible-by-default is on
	by default.
	* memattr.c (inaccessible_by_default): Change the initial
	value to 1.

Index: gdb/memattr.c
===================================================================
RCS file: /cvs/src/src/gdb/memattr.c,v
retrieving revision 1.29
diff -u -d -p -r1.29 memattr.c
--- gdb/memattr.c	23 Aug 2007 18:08:36 -0000	1.29
+++ gdb/memattr.c	26 Sep 2007 19:41:23 -0000
@@ -65,7 +65,7 @@ static int target_mem_regions_valid;
 /* If this flag is set, gdb will assume that memory ranges not
    specified by the memory map have type MEM_NONE, and will
    emit errors on all accesses to that memory.  */
-static int inaccessible_by_default = 0;
+static int inaccessible_by_default = 1;
 
 static void
 show_inaccessible_by_default (struct ui_file *file, int from_tty,
Index: gdb/doc/gdb.texinfo
===================================================================
RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v
retrieving revision 1.432
diff -u -d -p -r1.432 gdb.texinfo
--- gdb/doc/gdb.texinfo	16 Sep 2007 14:59:30 -0000	1.432
+++ gdb/doc/gdb.texinfo	26 Sep 2007 19:41:24 -0000
@@ -6973,7 +6973,7 @@ explicitly described by the memory range
 to such memory.  The checks are only performed if there's at least one
 memory range defined.  If @code{off} is specified, make @value{GDBN}
 treat the memory not explicitly described by the memory ranges as RAM.
-The default value is @code{off}.
+The default value is @code{on}.
 @kindex show mem inaccessible-by-default
 @item show mem inaccessible-by-default
 Show the current handling of accesses to unknown memory.


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