From: Kazu Hirata <kazu@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: [patch] Turn on inaccessible-by-default by default.
Date: Wed, 26 Sep 2007 19:44:00 -0000 [thread overview]
Message-ID: <200709261944.l8QJiTlm025774@sparrowhawk.codesourcery.com> (raw)
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.
next reply other threads:[~2007-09-26 19:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-26 19:44 Kazu Hirata [this message]
2007-09-26 20:42 ` Eli Zaretskii
2007-09-26 20:55 ` Kazu Hirata
2007-09-26 21:05 ` Daniel Jacobowitz
2007-10-11 17:36 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200709261944.l8QJiTlm025774@sparrowhawk.codesourcery.com \
--to=kazu@codesourcery.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox