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

* Paul Koning <paulkoning@comcast.net> [2018-07-30 14:56:32 -0400]:

> 
> 
> > 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").

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

  reply	other threads:[~2018-07-30 19:02 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
2018-07-30 19:02   ` Andrew Burgess [this message]
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=20180730190155.GF3155@embecosm.com \
    --to=andrew.burgess@embecosm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=paulkoning@comcast.net \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).