[review] Allow re-assigning to convenience variables

Tom Tromey (Code Review)
2019-11-14T16:37:19Z

index 8259115..77bc0c1 100644
--- a/gdb/testsuite/gdb.base/gdbvars.exp
+++ b/gdb/testsuite/gdb.base/gdbvars.exp
@@ -51,6 +51,21 @@

gdb_test "print \$bar" " = void" \
"Print contents of uninitialized convenience variable"
+
+
+ gdb_test "print \$str = \"some string\"" \
+ " = \"some string\"" \
+ "Set convenience variable to string value"
+ gdb_test "print \$str = \"some other string\"" \
+ " = \"some other string\"" \
+ "Change convenience variable to different string value"
+
+ gdb_test "print \$arr = { 1, 2, 3}" \
+ " = \\{1, 2, 3\\}" \
+ "Set convenience variable to array value"
+ gdb_test "print \$arr = { 0, 1, 2, 3}" \
+ " = \\{0, 1, 2, 3\\}" \
+ "Set convenience variable to different array value"
}

proc test_convenience_functions {} {

--
Gerrit-Project: binutils-gdb
Gerrit-Branch: master
Gerrit-Change-Id: I5e66a2d243931a5c43c7af4bc9f6717464c2477e
Gerrit-Change-Number: 628
Gerrit-PatchSet: 1
Gerrit-Owner: Tom Tromey <tromey@sourceware.org>
Gerrit-MessageType: newchange