From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 119275 invoked by alias); 10 Apr 2015 14:09:23 -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 119261 invoked by uid 89); 10 Apr 2015 14:09:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,MIME_BASE64_BLANKS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: ausxipps301.us.dell.com Received: from ausxipps301.us.dell.com (HELO ausxipps301.us.dell.com) (143.166.148.223) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 10 Apr 2015 14:09:22 +0000 X-LoopCount0: from 10.170.28.41 From: To: CC: , , Subject: Re: [doc patch] compile: missing bits [Re: [PATCH v2 7/9] compile: New 'compile print'] Date: Fri, 10 Apr 2015 14:09:00 -0000 Message-ID: <5AFF5F78-4FCF-4D09-B5EF-7EE98A836E8C@dell.com> References: <20150406172623.31404.58833.stgit@host1.jankratochvil.net> <20150406172716.31404.8551.stgit@host1.jankratochvil.net> <83bnj1jgsw.fsf@gnu.org> <021F612D-0E51-44ED-BA7F-894A8B51F5BF@dell.com> <20150406175250.GA314@host1.jankratochvil.net> <0484210C-BBE9-4C64-8F51-7DC74ACF8F86@dell.com> <20150408200315.GA6777@host1.jankratochvil.net> <83egntg37h.fsf@gnu.org> <20150409173950.GA3400@host1.jankratochvil.net> <83pp7ddvcq.fsf@gnu.org> <20150410080933.GA8497@host1.jankratochvil.net> In-Reply-To: <20150410080933.GA8497@host1.jankratochvil.net> Content-Type: text/plain; charset="utf-8" Content-ID: Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg00380.txt.bz2 DQo+IE9uIEFwciAxMCwgMjAxNSwgYXQgNDowOSBBTSwgSmFuIEtyYXRvY2h2 aWwgPGphbi5rcmF0b2NodmlsQHJlZGhhdC5jb20+IHdyb3RlOg0KPiANCj4g Li4uDQo+IFdoZW4gc29tZSBwbGF0Zm9ybSBpcyBzdGlsbCB1c2luZyAtZ3N0 YWJzIGJ5IGRlZmF1bHQgKGlzIHRoZXJlIGFueT8pIC4uLg0KDQpJbiBnY2Ms IHllcy4gIEJ1dCB0aGUgb25lIEkga25vdyBvZiBpc27igJl0IHN1cHBvcnRl ZCBpbiBnZGIuDQoNCglwYXVsDQo= >From gdb-patches-return-121793-listarch-gdb-patches=sources.redhat.com@sourceware.org Fri Apr 10 14:15:32 2015 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 879 invoked by alias); 10 Apr 2015 14:15:32 -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 Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 865 invoked by uid 89); 10 Apr 2015 14:15:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 10 Apr 2015 14:15:30 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 290AAAB127; Fri, 10 Apr 2015 14:15:28 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3AEFQkD019180; Fri, 10 Apr 2015 10:15:27 -0400 Message-ID: <5527DAFE.10701@redhat.com> Date: Fri, 10 Apr 2015 14:15:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Luis Machado , "'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 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-04/txt/msg00381.txt.bz2 Content-length: 1195 On 04/10/2015 03:02 PM, Luis Machado wrote: > On 04/10/2015 07:04 AM, Pedro Alves wrote: >> On 04/09/2015 06:10 PM, Luis Machado wrote: >> unsupported "Cannot access memory" >> > > Did you mean untested here also? No. >> I'm thinking it'd be good to adjust the test to hardcode the >> breakpoint instruction (on an arch by arch basis, leaving the >> current generic code in place), as it'd be good to test >> stepping past permanent/program trap instructions >> on QEMU/Valgrind, etc. too. > > Originally i had modified the testcase so it would write the breakpoint > on its own based on what memcpy read before. We could still use this > mechanism so we don't need to hardcode per-arch breakpoint patterns. > What is your idea? Then we'd have somehow made .text writable, or copy the instructions somewhere else we can write, and execute them there. Either way sounds like we'd lose portability. My idea was just around something like: #ifdef __i386__ # define BP int3 #else if __aarch64__ # define BP ... #else # define BP NOP #endif and then in .exp file, if the breakpoint address still has a NOP, do the probing magic, otherwise, skip it. Thanks, Pedro Alves