From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24708 invoked by alias); 13 Apr 2015 17:51:21 -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 24699 invoked by uid 89); 13 Apr 2015 17:51:21 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com 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; Mon, 13 Apr 2015 17:51:20 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1YhiVw-0001zD-Tx from Luis_Gustavo@mentor.com ; Mon, 13 Apr 2015 10:51:16 -0700 Received: from [172.30.1.77] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Mon, 13 Apr 2015 10:51:16 -0700 Message-ID: <552C0212.5080102@codesourcery.com> Date: Mon, 13 Apr 2015 17:51:00 -0000 From: Luis Machado Reply-To: Luis Gustavo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Pedro Alves , "'gdb-patches@sourceware.org'" Subject: Re: [PATCH] Harden gdb.base/bp-permanent.exp References: <5526B296.8040000@codesourcery.com> <5527A047.1030201@redhat.com> <5527D804.10709@codesourcery.com> In-Reply-To: <5527D804.10709@codesourcery.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00477.txt.bz2 On 04/10/2015 11:02 AM, Luis Machado wrote: > On 04/10/2015 07:04 AM, Pedro Alves wrote: >> On 04/09/2015 06:10 PM, Luis Machado wrote: >> >>> diff --git a/gdb/testsuite/gdb.base/bp-permanent.exp >>> b/gdb/testsuite/gdb.base/bp-permanent.exp >>> index 81a5293..9193db8 100644 >>> --- a/gdb/testsuite/gdb.base/bp-permanent.exp >>> +++ b/gdb/testsuite/gdb.base/bp-permanent.exp >>> @@ -104,7 +104,18 @@ proc test {always_inserted sw_watchpoint} { >>> # to memory manually. >>> set count [expr $address_after_bp - $address_bp] >>> for {set i 0} {$i < $count} {incr i} { >>> - gdb_test "p /x addr_bp\[$i\] = buffer\[$i\]" " = .*" >>> + gdb_test_multiple "p /x addr_bp\[$i\] = buffer\[$i\]" $test { >>> + -re "Cannot access memory at address $hex.*$gdb_prompt $" { >>> + # Some targets (QEMU for one) do not allow writes to the >>> + # .text section. It is no use continuing with the test >>> + # at this point. Just return. >> >> Double space after period. >> >>> + unsupported $test >> >> Something like: >> >> unsupported "Cannot access memory" >> > > Did you mean untested here also? > > I went with "Cannot modify memory" to make the obstacle more explicit. I > also modified the comment a bit to make it clear what we are dealing > with. I'm sure older QEMU's worked in this regard, but more recent ones > have stack protection, for example, that will lead to these failures. > >> OK with those changes. >> > > Attached is what i plan to push later (pending the unsupported/untested > nit above). > I've pushed this now.