This is the mail archive of the gdb-patches@sources.redhat.com 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]

Re: Expect pattern match in printcmds.exp and setvar.exp


Orjan Friberg wrote:
> 
> Obviously I haven't understood expect's pattern matching, so a URL would
> be greatly appreciated. I've been digging through the expect info pages
> without finding a list of the meaning of special characters. I have
> patches for both test cases ready, but I would like to understand why it
> doesn't work in the first place before submitting them.
> 

Just to save other people from the trouble; I educated myself with
dev.scriptics.com:

{
     when followed by a character other than a digit, matches the
left-brace character `{';
     when followed by a digit, it is the beginning of a bound (see
above) 

The cases where I had to put \\ the { was followed by a digit, which
sort of explains it. Still, I'm a bit surprised that these testcases
should fail for native gdb without anybody else noticing, so I will
defer from posting the patches until someone else confirms that they
actually do. 

Built from the very latest cvs sources, for a native i686-pc-linux-gnu I
get:

printcmds.exp:

# of expected passes            658
# of expected failures          1
# of unresolved testcases       11

setvar.exp:

# of expected passes            98
# of unexpected failures        20
# of unresolved testcases       22

All of the unexpected failures and unresolved testcases are due to this
pattern matching problem. runtest --version on my system says:

Expect version is       5.31.2
Tcl version is          8.2
Framework version is    1.3.1

-- 
Orjan Friberg              E-mail: orjan.friberg@axis.com
Axis Communications AB     Phone:  +46 46 272 17 68

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