From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82001 invoked by alias); 30 Jul 2018 19:02:01 -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 81990 invoked by uid 89); 30 Jul 2018 19:02:01 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=HTo:D*comcast.net, Hx-languages-length:1415, Koning, koning X-HELO: mail-wr1-f68.google.com Received: from mail-wr1-f68.google.com (HELO mail-wr1-f68.google.com) (209.85.221.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 30 Jul 2018 19:01:59 +0000 Received: by mail-wr1-f68.google.com with SMTP id h14-v6so14014284wrw.13 for ; Mon, 30 Jul 2018 12:01:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2WqSBRbfvW5D+Ivk1QYK51ODgax+wd2HIgRA2JBzASI=; b=EyLbKzyItBidULCnZIGTJAemlAXtteAxDHuR0ikHGr76b/OB/fQvT5iFCP35HJWgyl 0K0ajGEMZRZGLV1wwses0YkgFgYMb71x66vlD8YawHyJb8wCUvZsnW2G+ts7vzho/aRp 3NQf0XNBKkVUB/qIa5w1PW9ah7DMawc+LZ9fkKP7nqZ9WY7cexkv/nB4ED2a7aIjwFsX 6rVlKxQCKNMZlLvYNR4IChBaskJYJY3ZGTX0hX7ug2XbjC38A29V0pt3JStGapKiKtiA G+N0wHtuuQTvitYSaq0Z5eGncMpdmcohdxM86DE2rJulIa57W949/I0R2x93TVowe9gl GJHg== Return-Path: Received: from localhost (host109-147-66-79.range109-147.btcentralplus.com. [109.147.66.79]) by smtp.gmail.com with ESMTPSA id x129-v6sm482800wme.11.2018.07.30.12.01.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Jul 2018 12:01:56 -0700 (PDT) Date: Mon, 30 Jul 2018 19:02:00 -0000 From: Andrew Burgess To: Paul Koning Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: Disable address space randomization for a test Message-ID: <20180730190155.GF3155@embecosm.com> References: <20180730185045.15565-1-andrew.burgess@embecosm.com> <345CD091-8A49-4862-B3A0-4531ADFF7151@comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <345CD091-8A49-4862-B3A0-4531ADFF7151@comcast.net> X-Fortune: ... and furthermore ... I don't like your trousers. X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-07/txt/msg00779.txt.bz2 * Paul Koning [2018-07-30 14:56:32 -0400]: > > > > On Jul 30, 2018, at 2:50 PM, Andrew Burgess wrote: > > > > 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. > > > > 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. > > > > Disabling address space randomization where appropriate fixes this > > issue. > > > > ... > > > > + # 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"). That's a very good question... now I just have to figure out why my incorrect patch fixed the problem I was seeing.... watch this space... > Also, does this work on every target OS? That's a good question, I don't have an answer for you. Thanks, Andrew