aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.ada/array_return.exp
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2006-12-27 06:12:36 +0000
committerJoel Brobecker <brobecker@gnat.com>2006-12-27 06:12:36 +0000
commitba54f3188b5fddbf4d1e534573448f674b8dee90 (patch)
tree7233dc9ec89d43d2193e1ea5c4ccea6a320507ad /gdb/testsuite/gdb.ada/array_return.exp
parente223b5bf0e07c3f2498a20c8fc61e0bba24d598a (diff)
downloadfsf-binutils-gdb-ba54f3188b5fddbf4d1e534573448f674b8dee90.zip
fsf-binutils-gdb-ba54f3188b5fddbf4d1e534573448f674b8dee90.tar.gz
fsf-binutils-gdb-ba54f3188b5fddbf4d1e534573448f674b8dee90.tar.bz2
* gdb.ada/array_return/pck.ads (Small_Float_Vector): New type.
(Create_Small_Float_Vector): New function. * gdb.ada/array_return/pck.adb (Create_Small_Float_Vector): Add function body. * gdb.ada/array_return/p.adb: Use new type and function from package Pck. * gdb.ada/array_return.exp: Add a test verifying that GDB is able to print the value returned by a function returning an array of float.
Diffstat (limited to 'gdb/testsuite/gdb.ada/array_return.exp')
-rw-r--r--gdb/testsuite/gdb.ada/array_return.exp19
1 files changed, 17 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.ada/array_return.exp b/gdb/testsuite/gdb.ada/array_return.exp
index c2ede2c..1a6ada1 100644
--- a/gdb/testsuite/gdb.ada/array_return.exp
+++ b/gdb/testsuite/gdb.ada/array_return.exp
@@ -54,12 +54,16 @@ gdb_test "break create_large" \
"Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \
"insert breakpoint in create_large"
+gdb_test "break create_small_float_vector" \
+ "Breakpoint \[0-9\]+ at.*: file .*pck.adb, line \[0-9\]+." \
+ "insert breakpoint in create_small_float_vector"
+
# Then continue until reaching the first breakpoint inside Create_Small,
# and then do a "finish".
gdb_test "cont" \
"Breakpoint \[0-9\]+, pck.create_small \\(\\).*" \
- "Continuing to Create.Small"
+ "Continuing to Create_Small"
gdb_test "finish" \
"Value returned is \\\$\[0-9\]+ = \\(1, 1\\)" \
@@ -70,7 +74,7 @@ gdb_test "finish" \
gdb_test "cont" \
"Breakpoint \[0-9\]+, pck.create_large \\(\\).*" \
- "Continuing to Create.Large"
+ "Continuing to Create_Large"
# On hppa32, the value returned is too large to be returned via a register.
# Instead, it is returned using the struct convention, and the debugger
@@ -84,3 +88,14 @@ gdb_test "finish" \
"Value returned is \\\$\[0-9\]+ = \\(2, 2, 2, 2\\)" \
"value printed by finish of Create_Large"
+# Now continue until reaching the third breakpoint, and then do another
+# "finish" again.
+
+gdb_test "cont" \
+ "Breakpoint \[0-9\]+, pck.create_small_float_vector \\(\\).*" \
+ "Continuing to Create_Small_Float_Vector"
+
+gdb_test "finish" \
+ "Value returned is \\\$\[0-9\]+ = \\(4.25, 4.25\\)" \
+ "value printed by finish of Create_Small_Float_Vector"
+