Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Paul Koning <paulkoning@comcast.net>
To: Andrew Burgess <andrew.burgess@embecosm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH] gdb: Disable address space randomization for a test
Date: Mon, 30 Jul 2018 18:56:00 -0000	[thread overview]
Message-ID: <345CD091-8A49-4862-B3A0-4531ADFF7151@comcast.net> (raw)
In-Reply-To: <20180730185045.15565-1-andrew.burgess@embecosm.com>



> On Jul 30, 2018, at 2:50 PM, Andrew Burgess <andrew.burgess@embecosm.com> 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").

Also, does this work on every target OS?

	paul


  reply	other threads:[~2018-07-30 18:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-30 18:50 Andrew Burgess
2018-07-30 18:56 ` Paul Koning [this message]
2018-07-30 19:02   ` Andrew Burgess
2018-07-30 19:49     ` Simon Marchi
2018-07-31 12:47       ` Andrew Burgess
2018-07-31 13:32         ` Simon Marchi
2018-07-31 14:23   ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=345CD091-8A49-4862-B3A0-4531ADFF7151@comcast.net \
    --to=paulkoning@comcast.net \
    --cc=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox