This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Expect pattern match in printcmds.exp and setvar.exp
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: Expect pattern match in printcmds.exp and setvar.exp
- From: Orjan Friberg <orjan dot friberg at axis dot com>
- Date: Thu, 28 Sep 2000 18:59:36 +0200
- Organization: Axis Communications AB
When running the printcmds.exp test for a native gdb
(i686-pc-linux-gnu), I get a few errors of the following type:
ERROR: Process no longer exists
UNRESOLVED: gdb.base/printcmds.exp: p int1dim
It seems as if the left curly brackets are not escaped properly (in
fact, they are not escaped at all):
gdb_test "p int1dim" \
" = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}"
Escaping { with \\ does the job -- the test PASSes like it should. I've
seen { escaped with a single \ in other test files, such as
funcargs.exp, and I cannot tell from looking at them why it doesn't work
in this case.
For setvar.exp, I get quite a few ERROR/UNRESOLVED test cases due to
this. The { for those particular tests is escaped by a single \. Again,
having \\ before { does the job. (The 20000928 summary.log at
netwinder.org for i386 also shows these errors for setvar.exp.)
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.
--
Orjan Friberg E-mail: orjan.friberg@axis.com
Axis Communications AB Phone: +46 46 272 17 68