This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb: Disable address space randomization for a test


* 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]