This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: -var-create testsuite updates [PATCH]
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: nickrob at snap dot net dot nz (Nick Roberts)
- Cc: drow at false dot org (Daniel Jacobowitz), gdb-patches at sourceware dot org
- Date: Fri, 9 Mar 2007 03:22:18 +0100 (CET)
- Subject: Re: -var-create testsuite updates [PATCH]
Nick Roberts wrote:
> The test is wrong. It looks like SPU initialises locals to 0.
Not necessarily, but it may happen.
> The value field for -var-create is new. I tried to make the regexp as specific
> as possible for a more exacting test.
>
> If value=\"($hex).*\" works in all cases (I might have the syntax wrong,
> I mean matching "0xabc" and "0xabc \"blah\"") that would be good. Otherwise
> just value=\".*\" will do.
value=\"$hex.*\" works for me. I've checked in the following patch.
Thanks,
Ulrich
ChangeLog:
* gdb.mi/mi-var-cmd.exp: Allow value without "..." string
for -var-create lpcharacter test.
* gdb.mi/mi2-var-cmd.exp: Likewise.
Index: gdb/testsuite/gdb.mi/mi-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-cmd.exp,v
retrieving revision 1.28
diff -u -p -r1.28 mi-var-cmd.exp
--- gdb/testsuite/gdb.mi/mi-var-cmd.exp 9 Mar 2007 01:14:12 -0000 1.28
+++ gdb/testsuite/gdb.mi/mi-var-cmd.exp 9 Mar 2007 02:16:14 -0000
@@ -87,7 +87,7 @@ mi_gdb_test "-var-create lcharacter * lc
"create local variable lcharacter "
mi_gdb_test "-var-create lpcharacter * lpcharacter" \
- "\\^done,name=\"lpcharacter\",numchild=\"1\",value=\"$hex \\\\\".*\\\\\"\",type=\"char \\*\"" \
+ "\\^done,name=\"lpcharacter\",numchild=\"1\",value=\"$hex.*\",type=\"char \\*\"" \
"create local variable lpcharacter"
mi_gdb_test "-var-create llong * llong" \
Index: gdb/testsuite/gdb.mi/mi2-var-cmd.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-var-cmd.exp,v
retrieving revision 1.11
diff -u -p -r1.11 mi2-var-cmd.exp
--- gdb/testsuite/gdb.mi/mi2-var-cmd.exp 28 Feb 2007 17:32:51 -0000 1.11
+++ gdb/testsuite/gdb.mi/mi2-var-cmd.exp 9 Mar 2007 02:16:14 -0000
@@ -87,7 +87,7 @@ mi_gdb_test "-var-create lcharacter * lc
"create local variable lcharacter "
mi_gdb_test "-var-create lpcharacter * lpcharacter" \
- "\\^done,name=\"lpcharacter\",numchild=\"1\",value=\"$hex \\\\\".*\\\\\"\",type=\"char \\*\"" \
+ "\\^done,name=\"lpcharacter\",numchild=\"1\",value=\"$hex.*\",type=\"char \\*\"" \
"create local variable lpcharacter"
mi_gdb_test "-var-create llong * llong" \
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com