aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.chill/result.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.chill/result.exp')
-rw-r--r--gdb/testsuite/gdb.chill/result.exp9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.chill/result.exp b/gdb/testsuite/gdb.chill/result.exp
index 73cae89..d10157a 100644
--- a/gdb/testsuite/gdb.chill/result.exp
+++ b/gdb/testsuite/gdb.chill/result.exp
@@ -52,6 +52,7 @@ proc do_tests {} {
send "set print sevenbit-strings\n" ; expect -re "$prompt $"
send "set print address off\n" ; expect -re "$prompt $"
+ # simple function
runto simple_func
send "step 2\n" ; expect -re "$prompt $"
gdb_test "print j" "= 5"
@@ -63,6 +64,14 @@ proc do_tests {} {
send "finish\n" ; expect -re "$prompt $"
send "step\n" ; expect -re "$prompt $"
gdb_test "print i" "= 50"
+
+ # returning a structure
+ runto ret_struct
+ send "step 2\n"; expect -re "$prompt $"
+ gdb_test "p result" {\[.l: 33, .b: FALSE\]}
+ send "set var result := \[383, TRUE\]\n"; expect -re "$prompt $"
+ send "finish\n"; expect -re "$prompt $"
+ gdb_test "p v_struct" {\[.l: 383, .b: TRUE\]}
}
do_tests