From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12366 invoked by alias); 26 Sep 2007 19:44:33 -0000 Received: (qmail 12357 invoked by uid 22791); 26 Sep 2007 19:44:32 -0000 X-Spam-Check-By: sourceware.org Received: from gateway.codesourcery.com (HELO sparrowhawk.codesourcery.com) (65.74.133.9) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 26 Sep 2007 19:44:31 +0000 Received: from sparrowhawk.codesourcery.com (localhost.localdomain [127.0.0.1]) by sparrowhawk.codesourcery.com (8.13.1/8.13.1) with ESMTP id l8QJiTEt025779 for ; Wed, 26 Sep 2007 12:44:29 -0700 Received: (from kazu@localhost) by sparrowhawk.codesourcery.com (8.13.1/8.13.1/Submit) id l8QJiTlm025774; Wed, 26 Sep 2007 12:44:29 -0700 Date: Wed, 26 Sep 2007 19:44:00 -0000 Message-Id: <200709261944.l8QJiTlm025774@sparrowhawk.codesourcery.com> From: Kazu Hirata To: gdb-patches@sourceware.org Subject: [patch] Turn on inaccessible-by-default by default. Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-09/txt/msg00386.txt.bz2 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 * 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.