aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2011-05-23 20:27:23 +0000
committerTom Tromey <tromey@redhat.com>2011-05-23 20:27:23 +0000
commitc50491a797e94e65b9692ed05ff7536ee3df5b30 (patch)
tree227d6c52a602e4fd96cd80aaea1c60b7d474aa55 /gdb/testsuite/gdb.base
parent1ce749055f5e2ab5ae4450ff10082745021ecce8 (diff)
downloadgdb-c50491a797e94e65b9692ed05ff7536ee3df5b30.zip
gdb-c50491a797e94e65b9692ed05ff7536ee3df5b30.tar.gz
gdb-c50491a797e94e65b9692ed05ff7536ee3df5b30.tar.bz2
gdb
* c-lang.c (evaluate_subexp_c): Use expect_type if it is not NULL. gdb/testsuite * gdb.base/charset.exp (string_display): Add tests to assign to arrays. * gdb.base/charset.c (short_array, int_array, long_array): New.
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/charset.c5
-rw-r--r--gdb/testsuite/gdb.base/charset.exp9
2 files changed, 14 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/charset.c b/gdb/testsuite/gdb.base/charset.c
index 644fe47..df56c45 100644
--- a/gdb/testsuite/gdb.base/charset.c
+++ b/gdb/testsuite/gdb.base/charset.c
@@ -73,6 +73,11 @@ char32_t *String32;
typedef wchar_t my_wchar_t;
my_wchar_t myvar;
+/* Some arrays for simple assignment tests. */
+short short_array[3];
+int int_array[3];
+long long_array[3];
+
void
init_string (char string[],
char x,
diff --git a/gdb/testsuite/gdb.base/charset.exp b/gdb/testsuite/gdb.base/charset.exp
index ad0fec9..d87c769 100644
--- a/gdb/testsuite/gdb.base/charset.exp
+++ b/gdb/testsuite/gdb.base/charset.exp
@@ -625,4 +625,13 @@ if {$wchar_size == 4} {
}
+foreach name {short int long} {
+ # We're really just checking to make sure this doesn't give an
+ # error.
+ gdb_test "print ${name}_array = \"hi\"" \
+ " = {.*}" \
+ "assign string to $name array"
+}
+
+
gdb_exit