From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19924 invoked by alias); 20 Sep 2013 02:47:49 -0000 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 Received: (qmail 19911 invoked by uid 89); 20 Sep 2013 02:47:49 -0000 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Sep 2013 02:47:49 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FROM_12LTRDOM,KHOP_THREADED,RDNS_NONE,SPF_HELO_FAIL autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1VMqky-0004hU-45 from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Thu, 19 Sep 2013 19:47:44 -0700 Received: from SVR-ORW-FEM-03.mgc.mentorg.com ([147.34.97.39]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 19 Sep 2013 19:47:43 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.2.247.3; Thu, 19 Sep 2013 19:47:43 -0700 From: Yao Qi To: Subject: [PATCH 0/7 V3] Trust readonly sections if target has memory protection Date: Fri, 20 Sep 2013 02:47:00 -0000 Message-ID: <1379645226-8719-1-git-send-email-yao@codesourcery.com> In-Reply-To: <1378641807-24256-1-git-send-email-yao@codesourcery.com> References: <1378641807-24256-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2013-09/txt/msg00714.txt.bz2 Hello, Here is the V3, to address two comments to V2. - Give a yes-or-no query when read-only address is modified and trust-readonly-sections is on. See patch 1/7. A test case gdb.base/trust-readonly.exp is added too. - Enable trust-readonly-sections on all linux and windows targets for remote debugging only. It is different from what I proposed, {x86, x86_64}-{linux,mingw,cygwin}, because it looks odd to enable this feature only on x86*-linux targets and disable it on the rest of linux targets. See patch 4/7. Patch 2/7, 3/7, 6/7 and 7/7 are unchanged. Since the condition on trusting readonly-sections is restricted (only on remote debugging), so the doc (patch 5/7) is updated as well. V2 can be found https://sourceware.org/ml/gdb-patches/2013-09/msg00258.html *** BLURB HERE *** Yao Qi (7): Emit a warning when writing to a readonly section and trust_readonly is true set trust-readonly-sections off in test cases New function windows_init_abi Trust readonly sections if target has memory protection and in remote debugging DOC and NEWS Linux has memory protection. Windows has memory protection gdb/NEWS | 5 ++ gdb/amd64-windows-tdep.c | 5 +- gdb/arch-utils.c | 7 +++ gdb/arch-utils.h | 2 + gdb/doc/gdb.texinfo | 12 ++++- gdb/gdbarch.c | 24 ++++++++ gdb/gdbarch.h | 6 ++ gdb/gdbarch.sh | 3 + gdb/i386-cygwin-tdep.c | 9 +--- gdb/linux-tdep.c | 10 ++++ gdb/target.c | 70 ++++++++++++++++++------ gdb/testsuite/gdb.base/break-always.exp | 4 ++ gdb/testsuite/gdb.base/trust-readonly.exp | 85 +++++++++++++++++++++++++++++ gdb/testsuite/gdb.mi/mi-fill-memory.exp | 5 ++ gdb/windows-tdep.c | 31 ++++++++++- gdb/windows-tdep.h | 6 +-- 16 files changed, 250 insertions(+), 34 deletions(-) create mode 100644 gdb/testsuite/gdb.base/trust-readonly.exp -- 1.7.7.6