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: [RFC] Trying to fix testsuite/gdb.arch/i386-sse.exp pattern problem


On Thu, Nov 08, 2007 at 03:51:11PM +0100, Pierre Muller wrote:
> > printf 'send_user "[regexp {[\r\n]*(.* = 1{1,}2{1,}.*)[\r\n]+\(gdb\) $}
> > {print 1122233\r\n$2 = 1122233\r\n(gdb) }]\n"' | expect
> It does succeed indeed... 
> > It should print 1; if it prints 0 for you that would be somewhere to
> > start.
> 
>   But if I put the send_user part inside my test.exp
> it returns 0!

That's not surprising.  The quoting rules are different.  Try:

send_user "[regexp {[\r\n]*(.* = 1{1,}2{1,}.*)[\r\n]+\(gdb\) $} \
	  "print 1122233\r\n\$2 = 1122233\r\n(gdb) "]\n"

The quotes instead of braces let literal \r\n get into the test string.

-- 
Daniel Jacobowitz
CodeSourcery


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