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: Prelink.exp troubles


On Fri, Mar 03, 2006 at 11:04:21AM -0300, Alexandre Oliva wrote:
> On Mar  1, 2006, Daniel Jacobowitz <drow@false.org> wrote:
> 
> > First: you're using gdb_expect directly.  I'm sorry I didn't notice
> > this before.  Don't do that; use gdb_test_multiple instead.
> 
> Tricky to catch two independent messages triggered by the same command
> that way while still producing a fail if either fails to match, so I
> put them now in a single regexp.

Actually, it's very easy: set a flag when you see the each message,
exp_continue if you haven't seen the other.  This is fine too.

> > We need to either copy the libraries around (complicated, fragile), or
> > punt if the system ld.so is not prelinked.
> 
> Punting it is :-)  Tricky, since prelink doesn't report an error in
> this case.  Fortunately prelink -u does.
> 
> How's this?  I've tested it on amd64-linux-gnu, with and without
> prelinked system libraries.  I got the warning in the latter case, and
> a pass in the former.

Hmm, two things: I don't think a WARNING is appropriate (there's
nothing wrong), how about just an UNTESTED?  And, when matching
patterns in gdb_test_multiple (the same was true in gdb_expect)
it's important to anchor the end of the pattern to the GDB prompt.
Otherwise that prompt might not be consumed by expect, causing
new tests added at the end of the file to fail.

If you agree about the UNTESTED, with those changes it's fine to check
in.  My test runs thank you.

-- 
Daniel Jacobowitz
CodeSourcery


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