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]
Other format: [Raw text]

Re: RFA: patch to fix gdb/1680


On Fri, Jun 18, 2004 at 03:18:36PM -0400, Michael Chastain wrote:
> drow> Does it work if you put a backslash in front of them instead?  That's
> drow> clearer to read, IMO.
> 
> On my machine (expect 5.41):
> 
>   "{...}"      ERROR: Process no longer exists
>   "\{...\}"    ERROR: Process no longer exists
>   "\\{...\\}"  Works fine

This error means that, somewhere, a syntax error has occured and
dejagnu has swallowed it.  I submitted a patch to DejaGNU to diagnose
this better and it was ignored in the general confusion that is DejaGNU
maintenance.

> I definitely want Jim's patch so that i386-sse.exp does its job.
> If you insist, we could make PR gdb/1680 suspended instead of
> closing it, to remind us of this unsolved mystery.

I prefer to solve the mystery instead.

If you pull that patch out of the DejaGNU list archives and apply it,
you will see:
ERROR OCCURED: couldn't compile regular expression pattern: invalid repetition count(s)

Presumably this version of TCL does not put special meaning on
{string}, but does on {NUMBER}, as has become fashionable for regex
engines.  When it sees {stringStartingWithADigit}, it tries to parse it
as a repetition count and throws an error.

Andrew writes:
> Try "{}" instead of {""}.  In these sorts of situtations that works a
> lot better.

which is the missing bit of my suggestion.  { and \{ are the same thing
when written in double quotes.  So (since we can't use {} here, because
there is a variable substitution inside gdb_test's argument), use two
backslashes.  That way one will reach the regex engine.

-- 
Daniel Jacobowitz


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