From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76394 invoked by alias); 30 Jul 2018 18:56:41 -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 76373 invoked by uid 89); 30 Jul 2018 18:56:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:ESMTPA X-HELO: resqmta-po-06v.sys.comcast.net Received: from resqmta-po-06v.sys.comcast.net (HELO resqmta-po-06v.sys.comcast.net) (96.114.154.165) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Jul 2018 18:56:39 +0000 Received: from resomta-po-10v.sys.comcast.net ([96.114.154.234]) by resqmta-po-06v.sys.comcast.net with ESMTP id k9maf9lIR4MtZkDLQfnK4K; Mon, 30 Jul 2018 18:56:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20161114; t=1532976996; bh=lETSgWikSg37vaHOFGAPn8yvMpo6MaVxJIunNUmsQxY=; h=Received:Received:Content-Type:Mime-Version:Subject:From:Date: Message-Id:To; b=bgmgUg3/ww3lgMOKwkOdCGcRP9Q+9K3aHRHJLp8lqhRetkmJZ7USbpSggCNf6WUcm 07+cgG99EIkGtL03kqXRaLkTBAgytQ3Mw6ukbLg/PZdi4BhxmIk+tRhep5iByhBSH2 KK3aDyx1UG6B+guRhlr5ul7UiUIZ7WKjawkPIsvE9ego86XGMnbyugX92kRfhO7Ai1 u+sl+vkW/j6ZU1kHH9khwf3O42a6CKg7/WENxC2j0EpqcAKmFpHo4k6xq3iabKksDQ T+7kHMl35NfE+Sex2d/ys5lqCa2cdPwgw3phfLbuX8D2h1LWOlN3r4104bn31Yk+G5 IAOQMfsJichcg== Received: from [192.168.10.125] ([73.60.223.101]) by resomta-po-10v.sys.comcast.net with ESMTPA id kDLPfTRI1KNzAkDLPf2QJ6; Mon, 30 Jul 2018 18:56:36 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: [PATCH] gdb: Disable address space randomization for a test From: Paul Koning In-Reply-To: <20180730185045.15565-1-andrew.burgess@embecosm.com> Date: Mon, 30 Jul 2018 18:56:00 -0000 Cc: gdb-patches@sourceware.org Content-Transfer-Encoding: quoted-printable Message-Id: <345CD091-8A49-4862-B3A0-4531ADFF7151@comcast.net> References: <20180730185045.15565-1-andrew.burgess@embecosm.com> To: Andrew Burgess X-SW-Source: 2018-07/txt/msg00778.txt.bz2 > On Jul 30, 2018, at 2:50 PM, Andrew Burgess = wrote: >=20 > The gdb.opt/inline-break.exp test script relies on capturing a $pc > value in one run of GDB, then restarting GDB and placing a breakpoint > at the previously captured $pc and checking we get the expected > behaviour. >=20 > With address space randomization on then the captured $pc value is > almost never valid in the second run of GDB, and so the test fails. >=20 > Disabling address space randomization where appropriate fixes this > issue. >=20 > ... >=20 > + # At the end of this test we store a $pc value, then restart GDB, > + # and use this $pc value to place a breakpoint. If address space > + # randomization is on, then the chance of this $pc value being > + # correct in a second GDB instance is pretty small. > + gdb_test "set disable-randomization off" Does that turn off address randomization? The keyword implies the opposite= (double negative, so "disable... off" means "turn on"). Also, does this work on every target OS? paul